File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 18
18
//! Most messages that can be sent via the Unix domain socket implementing vhost-user have an
19
19
//! equivalent ioctl to the kernel implementation.
20
20
21
- use std:: fs:: File ;
22
21
use std:: io:: Error as IOError ;
23
22
24
23
pub mod message;
@@ -214,7 +213,8 @@ pub type HandlerResult<T> = std::result::Result<T, IOError>;
214
213
215
214
/// Utility function to take the first element from option of a vector of files.
216
215
/// Returns `None` if the vector contains no file or more than one file.
217
- pub ( crate ) fn take_single_file ( files : Option < Vec < File > > ) -> Option < File > {
216
+ #[ cfg( any( feature = "vhost-user-backend" , feature = "vhost-user-frontend" ) ) ]
217
+ pub ( crate ) fn take_single_file ( files : Option < Vec < std:: fs:: File > > ) -> Option < std:: fs:: File > {
218
218
let mut files = files?;
219
219
if files. len ( ) != 1 {
220
220
return None ;
You can’t perform that action at this time.
0 commit comments