[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 3/7] Don't import loop.h unless HAVE_DECL_LO_FLAGS_AUTOCLEAR is defined



From: "Daniel P. Berrange" <berrange redhat com>

The loop.h on RHEL4 is broken and cannot be imported. We already
detect this in configure as a side-effect of looking for whether
LO_FLAGS_AUTOCLEAR is available. We protected the impl with
HAVE_DECL_LO_FLAGS_AUTOCLEAR, but not the header import

Signed-off-by: Daniel P. Berrange <berrange redhat com>
---
 src/util/virfile.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/util/virfile.c b/src/util/virfile.c
index eec9bcc..9f79daf 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -32,7 +32,8 @@
 #include <unistd.h>
 #include <dirent.h>
 
-#ifdef __linux__
+#if defined(__linux__) && HAVE_DECL_LO_FLAGS_AUTOCLEAR
+# include <sys/types.h>
 # include <linux/loop.h>
 # include <sys/ioctl.h>
 #endif
-- 
1.8.1.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]