[PATCH] tests: avoid compile failure on linux kernels older than 2.6.19

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

 



Signed-off-by: Giuseppe Scrivano <gscrivan@xxxxxxxxxx>
---
 tests/securityselinuxhelper.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/securityselinuxhelper.c b/tests/securityselinuxhelper.c
index 89cba3a..d996825 100644
--- a/tests/securityselinuxhelper.c
+++ b/tests/securityselinuxhelper.c
@@ -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>
@@ -33,6 +35,10 @@
 #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);
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]