summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2013-10-07 11:45:00 +0200
committerEric Blake <eblake@redhat.com>2013-10-07 08:40:30 -0600
commitba1a91cd1fb3b82b40da654c3ade1fecd41537e1 (patch)
treedb96c70659bede91dddc613bc8dfa556f1956d0d /tests
parente5f46105a146c51e26b0d7d986044556aa15deb3 (diff)
downloadlibvirt-ba1a91cd1fb3b82b40da654c3ade1fecd41537e1.tar.gz
tests: avoid compile failure on linux kernels older than 2.6.19
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/securityselinuxhelper.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/securityselinuxhelper.c b/tests/securityselinuxhelper.c
index 89cba3a471..d9968253ba 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);