]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: avoid compile failure on linux kernels older than 2.6.19
authorGiuseppe Scrivano <gscrivan@redhat.com>
Mon, 7 Oct 2013 09:45:00 +0000 (11:45 +0200)
committerEric Blake <eblake@redhat.com>
Mon, 7 Oct 2013 14:40:30 +0000 (08:40 -0600)
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
tests/securityselinuxhelper.c

index 89cba3a4713bdaea2b06664347ebe424282a8a9d..d9968253ba05dd053c0e31ab0699bb9a0b48732f 100644 (file)
@@ -24,7 +24,9 @@
 
 #include <dlfcn.h>
 #include <errno.h>
-#include <linux/magic.h>
+#if HAVE_LINUX_MAGIC_H
+# include <linux/magic.h>
+#endif
 #include <selinux/selinux.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <attr/xattr.h>
 
+#ifndef NFS_SUPER_MAGIC
+# define NFS_SUPER_MAGIC 0x6969
+#endif
+
 #include "virstring.h"
 
 static int (*realstatfs)(const char *path, struct statfs *buf);