diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-11-10 18:04:15 -0800 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-11-12 20:42:48 +0700 |
commit | 2b42f64737adf6a2ddd491213580d6e9cdd2f5af (patch) | |
tree | 47b2e9d7fd2475f05151cc2f8888d69961110f36 | |
parent | 0e6c0f153cc73f6a88f771e82b4b6e1fc7ca3e80 (diff) | |
download | acl-2b42f64737adf6a2ddd491213580d6e9cdd2f5af.tar.gz |
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>
-rw-r--r-- | tools/chacl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/chacl.c b/tools/chacl.c index 525a7ff..8fff875 100644 --- a/tools/chacl.c +++ b/tools/chacl.c @@ -320,7 +320,7 @@ walk_dir(acl_t acl, acl_t dacl, const char *fname) { 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 char *fname) 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; |