vhost_user: Fix cfg for take_single_file

BUG=none
TEST=cargo test --all-features
TEST=cargo test --features=vhost-user passed with no warnings

Change-Id: I98e69309c6ec81ede3e790c9b6b8b79991484cc1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3288732
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
diff --git a/third_party/vmm_vhost/src/vhost_user/mod.rs b/third_party/vmm_vhost/src/vhost_user/mod.rs
index 6968b4a..725a2d3 100644
--- a/third_party/vmm_vhost/src/vhost_user/mod.rs
+++ b/third_party/vmm_vhost/src/vhost_user/mod.rs
@@ -173,6 +173,7 @@
 
 /// Utility function to take the first element from option of a vector of files.
 /// Returns `None` if the vector contains no file or more than one file.
+#[cfg(any(feature = "vhost-user-master", feature = "vhost-user-slave"))]
 pub(crate) fn take_single_file(files: Option<Vec<File>>) -> Option<File> {
     let mut files = files?;
     if files.len() != 1 {