[libvirt] [PATCH] Make mntent.h specific to the FS storage backend

john.levon at sun.com john.levon at sun.com
Sat Dec 20 16:48:04 UTC 2008


# HG changeset patch
# User john.levon at sun.com
# Date 1229789393 28800
# Node ID c433c57ef39b2c343653910df84130c8849a7c11
# Parent  100de621beed6e146b239df3691bd426090955b4
Make mntent.h specific to the FS storage backend

It's Linux specific, so for now, put it behind a WITH_STORAGE_FS guard.

Signed-off-by: John Levon <john.levon at sun.com>

diff --git a/src/storage_backend_fs.c b/src/storage_backend_fs.c
--- a/src/storage_backend_fs.c
+++ b/src/storage_backend_fs.c
@@ -31,7 +31,6 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include <mntent.h>
 #include <string.h>
 
 #include <libxml/parser.h>
@@ -242,6 +241,9 @@ static int virStorageBackendProbeFile(vi
 }
 
 #if WITH_STORAGE_FS
+
+#include <mntent.h>
+
 struct _virNetfsDiscoverState {
     const char *host;
     virStoragePoolSourceList list;




More information about the libvir-list mailing list