You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-forensics/aide/files/aide-0.16-support-attr-2.4....

29 lines
907 B

Fix build against attr >= 2.4.48
Drop obsolete attr/xattr.h include as did attr upstream in attr-2.4.48.
See http://git.savannah.nongnu.org/cgit/attr.git/commit/?id=7921157890d07858d092f4003ca4c6bae9fd2c38
ENOATTR definition was moved to attr/attributes.h, thus include it.
attr < 2.4.48 keeps ENOATTR definition in attr/xattr.h, so define it
manually if necessary in order to preserve backwards compatibility.
Bug: https://bugs.gentoo.org/648966
Upstream-bug: https://sourceforge.net/p/aide/patches/23/
diff --git a/include/db_config.h b/include/db_config.h
index e92fe1c..7e5ff0d 100644
--- a/include/db_config.h
+++ b/include/db_config.h
@@ -62,7 +62,10 @@ typedef struct acl_type {
#ifdef WITH_XATTR /* Do generic user Xattrs. */
#include <sys/xattr.h>
-#include <attr/xattr.h>
+#include <attr/attributes.h>
+#ifndef ENOATTR
+# define ENOATTR ENODATA
+#endif
#endif
typedef struct xattr_node