at 23.11-beta 1.1 kB view raw
1From 2b42f64737adf6a2ddd491213580d6e9cdd2f5af Mon Sep 17 00:00:00 2001 2From: Khem Raj <raj.khem@gmail.com> 3Date: Thu, 10 Nov 2022 18:04:15 -0800 4Subject: chacl: Use portable version of dirent and readdir 5 6Using 64bit versions on 32bit architectures should be enabled with 7--enable-largefile, this makes it portable across musl and glibc 8 9Signed-off-by: Khem Raj <raj.khem@gmail.com> 10--- 11 tools/chacl.c | 4 ++-- 12 1 file changed, 2 insertions(+), 2 deletions(-) 13 14diff --git a/tools/chacl.c b/tools/chacl.c 15index 525a7ff..8fff875 100644 16--- a/tools/chacl.c 17+++ b/tools/chacl.c 18@@ -320,7 +320,7 @@ walk_dir(acl_t acl, acl_t dacl, const char *fname) 19 { 20 int failed = 0; 21 DIR *dir; 22- struct dirent64 *d; 23+ struct dirent *d; 24 char *name; 25 26 if ((dir = opendir(fname)) == NULL) { 27@@ -332,7 +332,7 @@ walk_dir(acl_t acl, acl_t dacl, const char *fname) 28 return(0); /* got a file, not an error */ 29 } 30 31- while ((d = readdir64(dir)) != NULL) { 32+ while ((d = readdir(dir)) != NULL) { 33 /* skip "." and ".." entries */ 34 if (strcmp(d->d_name, ".") == 0 || strcmp(d->d_name, "..") == 0) 35 continue; 36-- 37cgit v1.1 38