From df09767773b5640f0ea68065092d22b484f21ce4 Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Fri, 3 Aug 2018 16:35:53 +0200 Subject: [PATCH] Fix include for xattr.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é --- m4/virt-attr.m4 | 2 +- tests/securityselinuxhelper.c | 2 +- tests/securityselinuxlabeltest.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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"