acl/0025-fix-compilation-with-latest-xattr-git.patch
Marcus Meissner 5439477a49 Accepting request 347209 from home:jeff_mahoney:branches:Base:System
- Update to git snapshot dated 21 Sep 2015.
  - Added:
    * 0001-Install-the-libraries-to-the-appropriate-directory.patch
    * 0002-setfacl.1-fix-typo-inclu-de-include.patch
    * 0003-test-fix-insufficient-quoting-of.patch
    * 0004-Makefile-rename-configure.in-to-configure.ac.patch
    * 0005-Bad-markup-in-acl.5-page.patch
    * 0006-.gitignore-ignore-and-config.h.in.patch
    * 0007-Use-autoreconf-rather-than-autoconf-to-regenerate-th.patch
    * 0008-libacl-Make-sure-that-acl_from_text-always-sets-errn.patch
    * 0009-libacl-fix-SIGSEGV-of-getfacl-e-on-overly-long-group.patch
    * 0010-punt-debian-rpm-packaging-logic.patch
    * 0011-move-gettext-logic-into-misc.h.patch
    * 0012-test-make-running-parallel-out-of-tree-safe.patch
    * 0013-modernize-build-system.patch
    * 0014-po-regenerate-files-after-move.patch
    * 0015-build-drop-aclincludedir-use-pkgincludedir.patch
    * 0016-build-make-use-of-an-aux-dir-to-stow-away-helper-scr.patch
    * 0017-build-ship-a-pkgconfig-file-for-libacl.patch
    * 0018-read_acl_-comments-seq-rename-line-to-lineno.patch
    * 0019-read_acl_-comments-seq-switch-to-next_line.patch
    * 0020-telldir-return-value-and-seekdir-second-parameters-a.patch
    * 0021-mark-libmisc-funcs-as-hidden-so-they-are-not-exporte.patch
    * 0022-add-__acl_-prefixes-to-internal-symbols.patch
    * 0023-cp.test-Check-permissions-of-the-right-file.patch
    * 0024-libacl-acl_set_file-Remove-unnecesary-racy-check.patch
    * 0025-fix-compilation-with-latest-xattr-git.patch
    * 0026-getfacl-Fix-memory-leak.patch
    * 0027-Fix-the-display-block-nesting-in-acl.5.patch
    * 0028-setfacl-man-page-Minor-wording-improvements.patch

OBS-URL: https://build.opensuse.org/request/show/347209
OBS-URL: https://build.opensuse.org/package/show/Base:System/acl?expand=0&rev=43
2015-12-03 14:58:36 +00:00

237 lines
6.2 KiB
Diff

From 79f563779b9b9ba89cc2352d70e3cdf27acff513 Mon Sep 17 00:00:00 2001
From: Brice De Bruyne <bricedb@gmail.com>
Date: Mon, 27 Apr 2015 14:57:56 +0200
Subject: [PATCH 25/34] 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.
---
configure.ac | 1 -
libacl/__acl_extended_file.c | 3 +--
libacl/acl_delete_def_file.c | 4 ++--
libacl/acl_extended_fd.c | 3 +--
libacl/acl_extended_file.c | 2 +-
libacl/acl_extended_file_nofollow.c | 2 +-
libacl/acl_get_fd.c | 3 +--
libacl/acl_get_file.c | 3 +--
libacl/acl_set_fd.c | 2 +-
libacl/acl_set_file.c | 2 +-
libacl/libacl.h | 5 +++++
m4/package_attrdev.m4 | 11 -----------
12 files changed, 15 insertions(+), 26 deletions(-)
diff --git a/configure.ac b/configure.ac
index 2182e81..cd3c680 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,7 +44,6 @@ dnl Automatically increment the revision for every release.
LT_REVISION=$(echo "${PACKAGE_VERSION}" | tr -d .)
AC_SUBST(LT_REVISION)
-AC_PACKAGE_NEED_ATTR_XATTR_H
AC_PACKAGE_NEED_ATTR_ERROR_H
AC_PACKAGE_NEED_GETXATTR_LIBATTR
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)
diff --git a/m4/package_attrdev.m4 b/m4/package_attrdev.m4
index 92c9135..1891bb2 100644
--- a/m4/package_attrdev.m4
+++ b/m4/package_attrdev.m4
@@ -12,17 +12,6 @@ dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
-AC_DEFUN([AC_PACKAGE_NEED_ATTR_XATTR_H],
- [ AC_CHECK_HEADERS([attr/xattr.h])
- if test "$ac_cv_header_attr_xattr_h" != "yes"; then
- echo
- echo 'FATAL ERROR: attr/xattr.h does not exist.'
- echo 'Install the extended attributes (attr) development package.'
- echo 'Alternatively, run "make install-dev" from the attr source.'
- exit 1
- fi
- ])
-
AC_DEFUN([AC_PACKAGE_NEED_ATTR_ERROR_H],
[ AC_CHECK_HEADERS([attr/error_context.h])
if test "$ac_cv_header_attr_error_context_h" != "yes"; then
--
2.5.2