]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Don't import loop.h unless HAVE_DECL_LO_FLAGS_AUTOCLEAR is defined
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 7 Mar 2013 16:34:54 +0000 (16:34 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 7 Mar 2013 18:07:27 +0000 (18:07 +0000)
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

index eec9bccafa77ec4f452ecc1b387d69e806dd5166..4a9fa811b2bc8c478d8ff5b8ad0b432ad8ac2edf 100644 (file)
@@ -32,7 +32,7 @@
 #include <unistd.h>
 #include <dirent.h>
 
-#ifdef __linux__
+#if defined(__linux__) && HAVE_DECL_LO_FLAGS_AUTOCLEAR
 # include <linux/loop.h>
 # include <sys/ioctl.h>
 #endif