All of lore.kernel.org
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH 07/11] acl: Enable largefile support by default
Date: Thu, 15 Dec 2022 00:45:42 -0800	[thread overview]
Message-ID: <20221215084546.125368-7-raj.khem@gmail.com> (raw)
In-Reply-To: <20221215084546.125368-1-raj.khem@gmail.com>

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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...rtable-version-of-dirent-and-readdir.patch | 39 +++++++++++++++++++
 meta/recipes-support/attr/acl_2.3.1.bb        |  3 ++
 2 files changed, 42 insertions(+)
 create mode 100644 meta/recipes-support/attr/acl/0001-chacl-Use-portable-version-of-dirent-and-readdir.patch

diff --git a/meta/recipes-support/attr/acl/0001-chacl-Use-portable-version-of-dirent-and-readdir.patch b/meta/recipes-support/attr/acl/0001-chacl-Use-portable-version-of-dirent-and-readdir.patch
new file mode 100644
index 0000000000..775675e1f2
--- /dev/null
+++ b/meta/recipes-support/attr/acl/0001-chacl-Use-portable-version-of-dirent-and-readdir.patch
@@ -0,0 +1,39 @@
+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
+
diff --git a/meta/recipes-support/attr/acl_2.3.1.bb b/meta/recipes-support/attr/acl_2.3.1.bb
index aca04a9aac..5fb8f9ae35 100644
--- a/meta/recipes-support/attr/acl_2.3.1.bb
+++ b/meta/recipes-support/attr/acl_2.3.1.bb
@@ -19,12 +19,15 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/acl/${BP}.tar.gz \
            file://run-ptest \
            file://0001-tests-do-not-hardcode-the-build-path-into-a-helper-l.patch \
            file://0001-test-patch-out-failing-bits.patch \
+           file://0001-chacl-Use-portable-version-of-dirent-and-readdir.patch \
            "
 
 SRC_URI[sha256sum] = "760c61c68901b37fdd5eefeeaf4c0c7a26bdfdd8ac747a1edff1ce0e243c11af"
 
 inherit autotools gettext ptest
 
+EXTRA_OECONF += "--enable-largefile"
+
 PACKAGES =+ "lib${BPN}"
 
 FILES:lib${BPN} = "${libdir}/lib*${SOLIBS}"
-- 
2.39.0



  parent reply	other threads:[~2022-12-15  8:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15  8:45 [PATCH 01/11] erofs-utils: Convert from off64_t to off_t Khem Raj
2022-12-15  8:45 ` [PATCH 02/11] pseudo: Remove 64bit time_t flags Khem Raj
2022-12-15  8:45 ` [PATCH 03/11] unfs3: Define off64_t in terms of off_t on musl Khem Raj
2022-12-15  8:45 ` [PATCH 04/11] acpid: Fix largefile enabled build Khem Raj
2022-12-15  8:45 ` [PATCH 05/11] efivar: Replace off64_t with off_t Khem Raj
2022-12-15  8:45 ` [PATCH 06/11] ltp: Fix largefile support Khem Raj
2022-12-15  8:45 ` Khem Raj [this message]
2022-12-15  8:45 ` [PATCH 08/11] e2fsprogs: Do not use 64bit functions for " Khem Raj
2022-12-15  9:14   ` [OE-core] " Alexander Kanavin
2022-12-15  8:45 ` [PATCH 09/11] libpciaccess: " Khem Raj
2022-12-15  8:45 ` [PATCH 10/11] mdadm: Use _FILE_OFFSET_BITS to use " Khem Raj
2022-12-15  8:45 ` [PATCH 11/11] btrfs-tools: Do not use 64bit functions for " Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221215084546.125368-7-raj.khem@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.