From: Martin Kletzander Date: Fri, 3 Aug 2018 14:35:53 +0000 (+0200) Subject: Fix include for xattr.h X-Git-Tag: v4.7.0-rc1~327 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df09767773b5640f0ea68065092d22b484f21ce4;p=thirdparty%2Flibvirt.git Fix include for xattr.h The proper file that should be included is `sys/xattr.h` as that comes from `glibc` and not `attr/xattr.h` which ships with the `attr` utility. We're most probably not the only ones because `attr/xattr.h` added a #warning to their include resulting in the following compilation errors: In file included from securityselinuxlabeltest.c:31:0: /usr/include/attr/xattr.h:5:2: error: #warning "Please change your includes to " [-Werror=cpp] #warning "Please change your includes to " ^~~~~~~ In file included from securityselinuxhelper.c:37:0: /usr/include/attr/xattr.h:5:2: error: #warning "Please change your includes to " [-Werror=cpp] #warning "Please change your includes to " ^~~~~~~ Signed-off-by: Martin Kletzander Reviewed-by: Daniel P. Berrangé --- diff --git a/m4/virt-attr.m4 b/m4/virt-attr.m4 index c55bd7dbd8..478549c17f 100644 --- a/m4/virt-attr.m4 +++ b/m4/virt-attr.m4 @@ -5,7 +5,7 @@ AC_DEFUN([LIBVIRT_ARG_ATTR],[ ]) AC_DEFUN([LIBVIRT_CHECK_ATTR],[ - LIBVIRT_CHECK_LIB([ATTR], [attr], [getxattr], [attr/xattr.h]) + LIBVIRT_CHECK_LIB([ATTR], [attr], [getxattr], [sys/xattr.h]) ]) AC_DEFUN([LIBVIRT_RESULT_ATTR],[ diff --git a/tests/securityselinuxhelper.c b/tests/securityselinuxhelper.c index 22b6709554..fe6f2b5fd9 100644 --- a/tests/securityselinuxhelper.c +++ b/tests/securityselinuxhelper.c @@ -34,7 +34,7 @@ #include #include #include -#include +#include #ifndef NFS_SUPER_MAGIC # define NFS_SUPER_MAGIC 0x6969 diff --git a/tests/securityselinuxlabeltest.c b/tests/securityselinuxlabeltest.c index c684989fd2..48fee7cd28 100644 --- a/tests/securityselinuxlabeltest.c +++ b/tests/securityselinuxlabeltest.c @@ -28,7 +28,7 @@ #include #include -#include +#include #include "internal.h" #include "testutils.h"