From d3478036a82502d7bf4863f27d4a29fc49a3b9fc Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Thu, 22 Nov 2018 23:55:24 +0100 Subject: [PATCH] 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. New enough `attr` utility (at least 2.4.48 in my case) even includes a #warning in `attr/xattr.h` for projects that still have this mistake in the code. --- daemon/xattr.c | 8 ++------ fuse/test-fuse.c | 4 ---- lib/fuse.c | 2 +- m4/guestfs-libraries.m4 | 1 - 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/daemon/xattr.c b/daemon/xattr.c index bbe571b3f..b10f6bddf 100644 --- a/daemon/xattr.c +++ b/daemon/xattr.c @@ -37,12 +37,8 @@ #ifdef HAVE_LINUX_XATTRS -# ifdef HAVE_ATTR_XATTR_H -# include -# else -# ifdef HAVE_SYS_XATTR_H -# include -# endif +# ifdef HAVE_SYS_XATTR_H +# include # endif int diff --git a/fuse/test-fuse.c b/fuse/test-fuse.c index 5ce8322f0..ac0a49348 100644 --- a/fuse/test-fuse.c +++ b/fuse/test-fuse.c @@ -41,13 +41,9 @@ #include #endif -#ifdef HAVE_ATTR_XATTR_H -#include -#else #ifdef HAVE_SYS_XATTR_H #include #endif -#endif #include #include "guestfs-utils.h" diff --git a/lib/fuse.c b/lib/fuse.c index 1ac42330d..52dc0bd99 100644 --- a/lib/fuse.c +++ b/lib/fuse.c @@ -35,7 +35,7 @@ #endif #if HAVE_FUSE -/* See */ +/* See */ #ifndef ENOATTR #define ENOATTR ENODATA #endif diff --git a/m4/guestfs-libraries.m4 b/m4/guestfs-libraries.m4 index 095dd38bf..6b2e8db94 100644 --- a/m4/guestfs-libraries.m4 +++ b/m4/guestfs-libraries.m4 @@ -36,7 +36,6 @@ AC_DEFINE_UNQUOTED([host_cpu],["$host_cpu"],[Host architecture.]) dnl Headers. AC_CHECK_HEADERS([\ - attr/xattr.h \ byteswap.h \ endian.h \ sys/endian.h \