summaryrefslogtreecommitdiff
path: root/libacl
diff options
context:
space:
mode:
authorBrice De Bruyne <bricedb@gmail.com>2015-04-27 14:57:56 +0200
committerAndreas Gruenbacher <andreas.gruenbacher@gmail.com>2015-04-27 14:57:56 +0200
commit79f563779b9b9ba89cc2352d70e3cdf27acff513 (patch)
treea06b12450dfbb51f0dbfe3f371dea9cdccf41134 /libacl
parent124e431e677f5ed3c45f71105a6770ceb96199dd (diff)
downloadacl-79f563779b9b9ba89cc2352d70e3cdf27acff513.tar.gz
fix compilation with latest xattr git
The attr package has <attr/xattr.h> removed, but acl has not been adapted yet. I took the liberty to cook up this patch that includes <sys/xattr.h> instead of <attr/xattr.h> in affected c files and I added errno.h plus a define of ENOATTR to c files where needed. I also removed the AC_PACKAGE_NEED_ATTR_XATTR_H definition from package_attrdev.m4, and changed configure to skip this test. Further changes by Andreas: Move the ENOATTR check into libacl.h.
Diffstat (limited to 'libacl')
-rw-r--r--libacl/__acl_extended_file.c3
-rw-r--r--libacl/acl_delete_def_file.c4
-rw-r--r--libacl/acl_extended_fd.c3
-rw-r--r--libacl/acl_extended_file.c2
-rw-r--r--libacl/acl_extended_file_nofollow.c2
-rw-r--r--libacl/acl_get_fd.c3
-rw-r--r--libacl/acl_get_file.c3
-rw-r--r--libacl/acl_set_fd.c2
-rw-r--r--libacl/acl_set_file.c2
-rw-r--r--libacl/libacl.h5
10 files changed, 15 insertions, 14 deletions
diff --git a/libacl/__acl_extended_file.c b/libacl/__acl_extended_file.c
index 3e45abd..c81dc8f 100644
--- a/libacl/__acl_extended_file.c
+++ b/libacl/__acl_extended_file.c
@@ -20,14 +20,13 @@
*/
#include <unistd.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include "libacl.h"
#include "byteorder.h"
#include "acl_ea.h"
#include "__acl_extended_file.h"
-
int
__acl_extended_file(const char *path_p,
ssize_t (*fun)(const char *, const char *,
diff --git a/libacl/acl_delete_def_file.c b/libacl/acl_delete_def_file.c
index fae4460..845940c 100644
--- a/libacl/acl_delete_def_file.c
+++ b/libacl/acl_delete_def_file.c
@@ -20,11 +20,11 @@
*/
#include <sys/types.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include "byteorder.h"
#include "acl_ea.h"
#include "config.h"
-
+#include "libacl.h"
/* 23.4.8 */
int
diff --git a/libacl/acl_extended_fd.c b/libacl/acl_extended_fd.c
index f19ad7b..bbf9055 100644
--- a/libacl/acl_extended_fd.c
+++ b/libacl/acl_extended_fd.c
@@ -20,13 +20,12 @@
*/
#include <unistd.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include "libacl.h"
#include "byteorder.h"
#include "acl_ea.h"
-
int
acl_extended_fd(int fd)
{
diff --git a/libacl/acl_extended_file.c b/libacl/acl_extended_file.c
index f417784..87f8e6e 100644
--- a/libacl/acl_extended_file.c
+++ b/libacl/acl_extended_file.c
@@ -20,7 +20,7 @@
*/
#include <unistd.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include "libacl.h"
#include "__acl_extended_file.h"
diff --git a/libacl/acl_extended_file_nofollow.c b/libacl/acl_extended_file_nofollow.c
index c253e4d..a15b076 100644
--- a/libacl/acl_extended_file_nofollow.c
+++ b/libacl/acl_extended_file_nofollow.c
@@ -20,7 +20,7 @@
*/
#include <unistd.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include "libacl.h"
#include "__acl_extended_file.h"
diff --git a/libacl/acl_get_fd.c b/libacl/acl_get_fd.c
index f2525ef..15e3880 100644
--- a/libacl/acl_get_fd.c
+++ b/libacl/acl_get_fd.c
@@ -23,7 +23,7 @@
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include <acl/libacl.h>
#include "libacl.h"
#include "__acl_from_xattr.h"
@@ -31,7 +31,6 @@
#include "byteorder.h"
#include "acl_ea.h"
-
/* 23.4.15 */
acl_t
acl_get_fd(int fd)
diff --git a/libacl/acl_get_file.c b/libacl/acl_get_file.c
index 110ef2e..d3131bc 100644
--- a/libacl/acl_get_file.c
+++ b/libacl/acl_get_file.c
@@ -23,7 +23,7 @@
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include <acl/libacl.h>
#include "libacl.h"
#include "__acl_from_xattr.h"
@@ -31,7 +31,6 @@
#include "byteorder.h"
#include "acl_ea.h"
-
/* 23.4.16 */
acl_t
acl_get_file(const char *path_p, acl_type_t type)
diff --git a/libacl/acl_set_fd.c b/libacl/acl_set_fd.c
index e6413ad..38dcd4a 100644
--- a/libacl/acl_set_fd.c
+++ b/libacl/acl_set_fd.c
@@ -20,7 +20,7 @@
*/
#include <unistd.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include "libacl.h"
#include "__acl_to_xattr.h"
diff --git a/libacl/acl_set_file.c b/libacl/acl_set_file.c
index a7e368f..c234b4a 100644
--- a/libacl/acl_set_file.c
+++ b/libacl/acl_set_file.c
@@ -22,7 +22,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include "libacl.h"
#include "__acl_to_xattr.h"
diff --git a/libacl/libacl.h b/libacl/libacl.h
index e79575d..08ba905 100644
--- a/libacl/libacl.h
+++ b/libacl/libacl.h
@@ -17,8 +17,13 @@
#include <errno.h>
#include <sys/acl.h>
+#include <errno.h>
#include "libobj.h"
+#ifndef ENOATTR
+# define ENOATTR ENODATA
+#endif
+
typedef unsigned int permset_t;
#define ACL_PERM_NONE (0x0000)