summaryrefslogtreecommitdiffstats
path: root/recipes-ids/samhain/files/0009-fix-build-with-new-version-attr.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-ids/samhain/files/0009-fix-build-with-new-version-attr.patch')
-rw-r--r--recipes-ids/samhain/files/0009-fix-build-with-new-version-attr.patch73
1 files changed, 73 insertions, 0 deletions
diff --git a/recipes-ids/samhain/files/0009-fix-build-with-new-version-attr.patch b/recipes-ids/samhain/files/0009-fix-build-with-new-version-attr.patch
new file mode 100644
index 0000000..b58eda9
--- /dev/null
+++ b/recipes-ids/samhain/files/0009-fix-build-with-new-version-attr.patch
@@ -0,0 +1,73 @@
1From 9d693fbeb0a14bfe858aed2b46cb9e74a90d00b9 Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Sun, 19 Jan 2020 15:53:48 +0800
4Subject: [PATCH] fix build with new version attr
5
6The attr/xattr.h has been removed from attr 2.4.48 with commit:
7http://git.savannah.nongnu.org/cgit/attr.git/commit/include?id=7921157890d07858d092f4003ca4c6bae9fd2c38
8The xattr syscalls are provided by sys/xattr.h from glibc now.
9Remove the checking code to adapt it.
10
11Upstream-Status: Pending
12
13Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
14---
15 acinclude.m4 | 26 +++++++++++---------------
16 src/sh_unix.c | 2 +-
17 2 files changed, 12 insertions(+), 16 deletions(-)
18
19diff --git a/acinclude.m4 b/acinclude.m4
20index e2a57e2..bfdd2f6 100644
21--- a/acinclude.m4
22+++ b/acinclude.m4
23@@ -1392,23 +1392,19 @@ AC_DEFUN([sh_CHECK_POSIX_ACL],
24
25 AC_DEFUN([sh_CHECK_XATTR],
26 [
27- AC_CHECK_HEADERS(attr/xattr.h)
28- if test $ac_cv_header_attr_xattr_h = yes; then
29-
30- AC_CHECK_LIB([attr], [getxattr], sh_lattr=yes, sh_lattr=no)
31- if test x"$sh_lattr" = xyes; then
32- LIBATTR=-lattr
33- else
34- LIBATTR=
35- fi
36-
37- OLDLIBS="$LIBS"
38- LIBS="$LIBS $LIBATTR"
39- AC_CHECK_FUNCS([getxattr lgetxattr fgetxattr],
40- [sh_fattr=yes],[sh_fattr=no])
41- LIBS="$OLDLIBS"
42+ AC_CHECK_LIB([attr], [getxattr], sh_lattr=yes, sh_lattr=no)
43+ if test x"$sh_lattr" = xyes; then
44+ LIBATTR=-lattr
45+ else
46+ LIBATTR=
47 fi
48
49+ OLDLIBS="$LIBS"
50+ LIBS="$LIBS $LIBATTR"
51+ AC_CHECK_FUNCS([getxattr lgetxattr fgetxattr],
52+ [sh_fattr=yes],[sh_fattr=no])
53+ LIBS="$OLDLIBS"
54+
55 if test x"$sh_fattr" = xyes; then
56 AC_DEFINE([USE_XATTR], [1], [Define if you want extended attributes support.])
57 LIBS="$LIBS $LIBATTR"
58diff --git a/src/sh_unix.c b/src/sh_unix.c
59index b1c0b75..2469068 100644
60--- a/src/sh_unix.c
61+++ b/src/sh_unix.c
62@@ -3682,7 +3682,7 @@ static char * sh_unix_getinfo_acl (char * path, int fd, struct stat * buf)
63
64 #ifdef USE_XATTR
65
66-#include <attr/xattr.h>
67+#include <sys/xattr.h>
68 static char * sh_unix_getinfo_xattr_int (char * path, int fd, char * name)
69 {
70 char * out = NULL;
71--
722.34.1
73