summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jordan <immoloism@gmail.com>2023-07-19 15:26:58 +0000
committerMichał Górny <mgorny@gentoo.org>2023-07-19 20:30:57 +0200
commit436a86c6ba463931212876d2ed96d067f20d378e (patch)
tree3a055aa1e0d693582431af9f5ac35b170d3e606b /app-arch
parentapp-portage/pfl: add 3.2.1 (diff)
downloadgentoo-436a86c6ba463931212876d2ed96d067f20d378e.tar.gz
gentoo-436a86c6ba463931212876d2ed96d067f20d378e.tar.bz2
gentoo-436a86c6ba463931212876d2ed96d067f20d378e.zip
app-arch/libarchive: fix build on musl
Cherrypicked patch from master repo to fix compiling 3.7.0 under musl. Tested with both GCC and LLVM. Also added BDEP for sys-libs/queue-standalone for this version. Closes: https://bugs.gentoo.org/910552 Signed-off-by: Ian Jordan <immoloism@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/31959 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'app-arch')
-rw-r--r--app-arch/libarchive/files/libarchive-3.7.0-f_namemax-fix.patch19
-rw-r--r--app-arch/libarchive/libarchive-3.7.0.ebuild6
2 files changed, 25 insertions, 0 deletions
diff --git a/app-arch/libarchive/files/libarchive-3.7.0-f_namemax-fix.patch b/app-arch/libarchive/files/libarchive-3.7.0-f_namemax-fix.patch
new file mode 100644
index 000000000000..36ed70fca44b
--- /dev/null
+++ b/app-arch/libarchive/files/libarchive-3.7.0-f_namemax-fix.patch
@@ -0,0 +1,19 @@
+From: https://github.com/libarchive/libarchive/commit/bd074c2531e867078788fe8539376c31119e4e55.patch
+From: Wong Hoi Sing Edison <hswong3i@gmail.com>
+Date: Wed, 19 Jul 2023 16:59:32 +0800
+Subject: [PATCH] Replace `svfs.f_namelen` with `svfs.f_namemax` (#1924)
+
+The equivalent for `f_namelen` in struct statvfs is `f_namemax`.
+
+Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
+--- a/libarchive/archive_read_disk_posix.c
++++ b/libarchive/archive_read_disk_posix.c
+@@ -1866,7 +1866,7 @@ setup_current_filesystem(struct archive_read_disk *a)
+ #if defined(USE_READDIR_R)
+ /* Set maximum filename length. */
+ #if defined(HAVE_STATVFS)
+- t->current_filesystem->name_max = svfs.f_namelen;
++ t->current_filesystem->name_max = svfs.f_namemax;
+ #else
+ t->current_filesystem->name_max = sfs.f_namelen;
+ #endif
diff --git a/app-arch/libarchive/libarchive-3.7.0.ebuild b/app-arch/libarchive/libarchive-3.7.0.ebuild
index d6d88d91c98f..0346154a7172 100644
--- a/app-arch/libarchive/libarchive-3.7.0.ebuild
+++ b/app-arch/libarchive/libarchive-3.7.0.ebuild
@@ -46,8 +46,14 @@ DEPEND="${RDEPEND}
"
BDEPEND="
verify-sig? ( >=sec-keys/openpgp-keys-libarchive-20221209 )
+ elibc_musl? ( sys-libs/queue-standalone )
"
+# Bug #910552 Only required for version 3.7.0
+PATCHES=(
+ "${FILESDIR}/${P}-f_namemax-fix.patch"
+)
+
# false positives (checks for libc-defined hash functions)
QA_CONFIG_IMPL_DECL_SKIP=(
SHA256_Init SHA256_Update SHA256_Final