1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 03:05:48 +03:00
aports/community/bareos/xattr-include.patch
2021-01-22 17:42:13 +00:00

91 lines
2.8 KiB
Diff

diff --git a/core/src/droplet/configure.ac b/core/src/droplet/configure.ac
index a7d088a..d82d202 100644
--- a/core/src/droplet/configure.ac
+++ b/core/src/droplet/configure.ac
@@ -69,8 +69,6 @@ AC_MSG_NOTICE("Using JSON libs: $JSON_LIBS")
AC_SEARCH_LIBS([sqrt], [m], [], [AC_MSG_ERROR([libm library missing])])
AX_PTHREAD
-AC_CHECK_HEADER([attr/xattr.h],[],AC_MSG_ERROR([libattr1 missing]))
-
AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage],
[Build with test coverage instrumentation]))
if test "$enable_coverage" = yes ; then
diff --git a/core/src/droplet/libdroplet/src/backend/posix/backend.c b/core/src/droplet/libdroplet/src/backend/posix/backend.c
index 373a47b..fe95456 100644
--- a/core/src/droplet/libdroplet/src/backend/posix/backend.c
+++ b/core/src/droplet/libdroplet/src/backend/posix/backend.c
@@ -39,7 +39,13 @@
#include <sys/stat.h>
#include <dirent.h>
#include <sys/types.h>
-#include <linux/xattr.h>
+#ifdef HAVE_ATTR_XATTR_H
+# include <attr/xattr.h>
+#else
+# ifdef HAVE_SYS_XATTR_H
+# include <sys/xattr.h>
+# endif
+#endif
#include <utime.h>
#include <pwd.h>
#include <grp.h>
diff --git a/core/src/droplet/libdroplet/src/backend/posix/replyparser.c b/core/src/droplet/libdroplet/src/backend/posix/replyparser.c
index 1e7b2e5..de200b9 100644
--- a/core/src/droplet/libdroplet/src/backend/posix/replyparser.c
+++ b/core/src/droplet/libdroplet/src/backend/posix/replyparser.c
@@ -38,7 +38,13 @@
#include <sys/stat.h>
#include <dirent.h>
#include <sys/types.h>
-#include <linux/xattr.h>
+#ifdef HAVE_ATTR_XATTR_H
+# include <attr/xattr.h>
+#else
+# ifdef HAVE_SYS_XATTR_H
+# include <sys/xattr.h>
+# endif
+#endif
#include <utime.h>
#include <pwd.h>
#include <grp.h>
diff --git a/core/src/droplet/libdroplet/src/backend/posix/reqbuilder.c b/core/src/droplet/libdroplet/src/backend/posix/reqbuilder.c
index 1c74de1..8a83da9 100644
--- a/core/src/droplet/libdroplet/src/backend/posix/reqbuilder.c
+++ b/core/src/droplet/libdroplet/src/backend/posix/reqbuilder.c
@@ -38,8 +38,13 @@
#include <sys/stat.h>
#include <dirent.h>
#include <sys/types.h>
-#include <linux/xattr.h>
-#include <attr/xattr.h>
+#ifdef HAVE_ATTR_XATTR_H
+# include <attr/xattr.h>
+#else
+# ifdef HAVE_SYS_XATTR_H
+# include <sys/xattr.h>
+# endif
+#endif
#include <utime.h>
#include <pwd.h>
#include <grp.h>
diff --git a/core/src/droplet/libdroplet/src/utils.c b/core/src/droplet/libdroplet/src/utils.c
index 8114229..4fe947d 100644
--- a/core/src/droplet/libdroplet/src/utils.c
+++ b/core/src/droplet/libdroplet/src/utils.c
@@ -32,9 +32,14 @@
* https://github.com/scality/Droplet
*/
#include <dropletp.h>
-#include <linux/xattr.h>
-#include <attr/xattr.h>
#include <errno.h>
+#ifdef HAVE_ATTR_XATTR_H
+# include <attr/xattr.h>
+#else
+# ifdef HAVE_SYS_XATTR_H
+# include <sys/xattr.h>
+# endif
+#endif
/** @file */