aboutsummaryrefslogtreecommitdiff
path: root/utils/acl
diff options
context:
space:
mode:
authorTianling Shen <cnsztl@immortalwrt.org>2023-05-16 17:17:06 +0800
committerTianling Shen <cnsztl@gmail.com>2023-05-17 13:43:13 +0800
commit6c6d8fe5420a1fc88797f406e4483d743b87ac60 (patch)
tree1979feb747dde2a7eae92e51cc27c40616de2f4e /utils/acl
parenta5c2eececb64037a96163c62d41135b893f36ba8 (diff)
acl: fix compilation with musl 1.2.4
musl 1.2.4 deprecated legacy "LFS64" ("large file support") interfaces so just having _GNU_SOURCE defined is not enough anymore. Backport an upstream fix to replace these old functions. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Diffstat (limited to 'utils/acl')
-rw-r--r--utils/acl/Makefile2
-rw-r--r--utils/acl/patches/103-chacl-Use-portable-version-of-dirent-and-readdir.patch33
2 files changed, 34 insertions, 1 deletions
diff --git a/utils/acl/Makefile b/utils/acl/Makefile
index 8fa85ddc2..69caa54ed 100644
--- a/utils/acl/Makefile
+++ b/utils/acl/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=acl
PKG_VERSION:=2.3.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://git.savannah.nongnu.org/cgit/acl.git/snapshot
diff --git a/utils/acl/patches/103-chacl-Use-portable-version-of-dirent-and-readdir.patch b/utils/acl/patches/103-chacl-Use-portable-version-of-dirent-and-readdir.patch
new file mode 100644
index 000000000..66bd86c64
--- /dev/null
+++ b/utils/acl/patches/103-chacl-Use-portable-version-of-dirent-and-readdir.patch
@@ -0,0 +1,33 @@
+From 2b42f64737adf6a2ddd491213580d6e9cdd2f5af Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 10 Nov 2022 18:04:15 -0800
+Subject: [PATCH] chacl: Use portable version of dirent and readdir
+
+Using 64bit versions on 32bit architectures should be enabled with
+--enable-largefile, this makes it portable across musl and glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tools/chacl.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/tools/chacl.c
++++ b/tools/chacl.c
+@@ -320,7 +320,7 @@ walk_dir(acl_t acl, acl_t dacl, const ch
+ {
+ int failed = 0;
+ DIR *dir;
+- struct dirent64 *d;
++ struct dirent *d;
+ char *name;
+
+ if ((dir = opendir(fname)) == NULL) {
+@@ -332,7 +332,7 @@ walk_dir(acl_t acl, acl_t dacl, const ch
+ return(0); /* got a file, not an error */
+ }
+
+- while ((d = readdir64(dir)) != NULL) {
++ while ((d = readdir(dir)) != NULL) {
+ /* skip "." and ".." entries */
+ if (strcmp(d->d_name, ".") == 0 || strcmp(d->d_name, "..") == 0)
+ continue;