commit:     abeac3adcbfa4b853b9a7d727f5c6b134fad6fe5
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue May 15 07:33:40 2018 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Wed Nov 28 21:33:12 2018 +0000
URL:        https://gitweb.gentoo.org/proj/elfix.git/commit/?id=abeac3ad

attr/xattr.h is deprecated. Use sys/xattr.h instead

Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

 configure.ac        | 4 ++--
 scripts/paxmodule.c | 2 +-
 src/paxctl-ng.c     | 5 ++++-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 208d566..84ef48d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,9 +114,9 @@ AS_IF(
     [test "x$enable_xtpax" != "xno"],
     [
         AC_CHECK_HEADERS(
-            [attr/xattr.h],
+            [sys/xattr.h],
             [],
-            [AC_MSG_ERROR(["Missing necessary attr/xattr.h"])]
+            [AC_MSG_ERROR(["Missing necessary sys/xattr.h"])]
         )
         AC_CHECK_LIB(
             [attr],

diff --git a/scripts/paxmodule.c b/scripts/paxmodule.c
index 1355f86..6a93420 100644
--- a/scripts/paxmodule.c
+++ b/scripts/paxmodule.c
@@ -45,7 +45,7 @@
 #endif
 
 #ifdef XTPAX
- #include <attr/xattr.h>
+ #include <sys/xattr.h>
  #define PAX_NAMESPACE "user.pax.flags"
 #endif
 

diff --git a/src/paxctl-ng.c b/src/paxctl-ng.c
index d340a43..25396d4 100644
--- a/src/paxctl-ng.c
+++ b/src/paxctl-ng.c
@@ -49,7 +49,10 @@
 #endif
 
 #ifdef XTPAX
- #include <attr/xattr.h>
+ #include <sys/xattr.h>
+ #ifndef ENOATTR
+  #define ENOATTR ENODATA
+ #endif
  #define PAX_NAMESPACE "user.pax.flags"
  #define CREATE_XT_FLAGS_SECURE         1
  #define CREATE_XT_FLAGS_DEFAULT        2

Reply via email to