| Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame^] | 1 | From 93d95ed2eaedcca110c214e1fe3f8896b1f6f853 Mon Sep 17 00:00:00 2001 | 
 | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 
 | 3 | Date: Tue, 17 Dec 2019 20:24:27 +0100 | 
 | 4 | Subject: [PATCH] xattr: adjust for attr 2.4.48 release | 
 | 5 |  | 
 | 6 | Latest versions of attr have removed the xattr.h header, | 
 | 7 | with the rationale that libc is providing the same wrappers. | 
 | 8 |  | 
 | 9 | attr/attributes.h is providing the ENOATTR definition. | 
 | 10 |  | 
 | 11 | Upstream-Status: Pending | 
 | 12 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | 
 | 13 | --- | 
 | 14 |  ports/linux/subports         | 5 +++-- | 
 | 15 |  ports/linux/xattr/portdefs.h | 3 ++- | 
 | 16 |  2 files changed, 5 insertions(+), 3 deletions(-) | 
 | 17 |  | 
 | 18 | diff --git a/ports/linux/subports b/ports/linux/subports | 
 | 19 | index 2c43ac9..740ec83 100755 | 
 | 20 | --- a/ports/linux/subports | 
 | 21 | +++ b/ports/linux/subports | 
 | 22 | @@ -29,11 +29,12 @@ fi | 
 | 23 |  if	$port_xattr; then | 
 | 24 |  	cat > dummy.c <<EOF | 
 | 25 |  #include <sys/types.h> | 
 | 26 | -#include <attr/xattr.h> | 
 | 27 | +#include <sys/xattr.h> | 
 | 28 | +#include <attr/attributes.h> | 
 | 29 |  int i; | 
 | 30 |  EOF | 
 | 31 |  	if ! ${CC} -c -o dummy.o dummy.c >/dev/null 2>&1; then | 
 | 32 | -		echo >&2 "Warning: Can't compile trivial program using <attr/xattr.h>". | 
 | 33 | +		echo >&2 "Warning: Can't compile trivial program using <attr/attributes.h>". | 
 | 34 |  		echo >&2 "         xattr support will require that header." | 
 | 35 |  	fi | 
 | 36 |  	echo "linux/xattr" | 
 | 37 | diff --git a/ports/linux/xattr/portdefs.h b/ports/linux/xattr/portdefs.h | 
 | 38 | index 56cd3ca..068d39a 100644 | 
 | 39 | --- a/ports/linux/xattr/portdefs.h | 
 | 40 | +++ b/ports/linux/xattr/portdefs.h | 
 | 41 | @@ -2,5 +2,6 @@ | 
 | 42 |   * SPDX-License-Identifier: LGPL-2.1-only | 
 | 43 |   * | 
 | 44 |   */ | 
 | 45 | -#include <attr/xattr.h> | 
 | 46 | +#include <sys/xattr.h> | 
 | 47 | +#include <attr/attributes.h> | 
 | 48 |  #include <stdint.h> |