mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
This ensures right flags are passed so enable it. Musl and decoupled these APIs from _GNU_SOURCE and now are only available when _LARGEFILE64_SOURCE macro is enabled (From OE-Core rev: fa29c98302fcd765bcc0160ce5c2b8294de0d814) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
From 1a5671a4eb13b81b98c3e71f00370781563f66d8 Mon Sep 17 00:00:00 2001
|
|
From: Khem Raj <raj.khem@gmail.com>
|
|
Date: Thu, 10 Nov 2022 17:57:24 -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
|
|
|
|
Upstream-Status: Backport [https://git.savannah.nongnu.org/cgit/acl.git/commit/?id=2b42f64737adf6a2ddd491213580d6e9cdd2f5af]
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
---
|
|
tools/chacl.c | 4 ++--
|
|
1 file 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;
|
|
--
|
|
2.38.1
|
|
|