summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2021-07-18 13:46:26 -0400
committerMike Gilbert <floppym@gentoo.org>2021-07-18 13:46:26 -0400
commit2e20ec0fa649b0720f862615c6099b947848fd3c (patch)
treeb471fd666de7d28271f0dbc1061ea75353971825 /sys-apps
parentdev-ml/menhir: install menhirLib and menhirSdk too (diff)
downloadgentoo-2e20ec0fa649b0720f862615c6099b947848fd3c.tar.gz
gentoo-2e20ec0fa649b0720f862615c6099b947848fd3c.tar.bz2
gentoo-2e20ec0fa649b0720f862615c6099b947848fd3c.zip
sys-apps/file: fix seccomp build failure with musl
Closes: https://bugs.gentoo.org/789336 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/file/file-5.40-r3.ebuild1
-rw-r--r--sys-apps/file/files/file-5.40-seccomp-fstatat64-musl.patch31
2 files changed, 32 insertions, 0 deletions
diff --git a/sys-apps/file/file-5.40-r3.ebuild b/sys-apps/file/file-5.40-r3.ebuild
index 90b41899e807..7cb5ba7a5cd9 100644
--- a/sys-apps/file/file-5.40-r3.ebuild
+++ b/sys-apps/file/file-5.40-r3.ebuild
@@ -42,6 +42,7 @@ PATCHES=(
"${FILESDIR}/file-5.40-seccomp-faccessat.patch"
"${FILESDIR}/file-5.40-seccomp-fstatat64.patch" #784857
"${FILESDIR}/file-5.40-revert-char-count.patch" #799188
+ "${FILESDIR}/file-5.40-seccomp-fstatat64-musl.patch" #789336, not upstream yet
)
src_prepare() {
diff --git a/sys-apps/file/files/file-5.40-seccomp-fstatat64-musl.patch b/sys-apps/file/files/file-5.40-seccomp-fstatat64-musl.patch
new file mode 100644
index 000000000000..4cc648017860
--- /dev/null
+++ b/sys-apps/file/files/file-5.40-seccomp-fstatat64-musl.patch
@@ -0,0 +1,31 @@
+From 8c13923a8e17a02be0989649b2edc20124816729 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Tue, 15 Jun 2021 16:08:22 -0400
+Subject: [PATCH] seccomp: undef fstatat64 to avoid build failure on musl
+
+sys/stat.h in musl does this:
+
+ #define fstatat64 fstatat
+
+Counteract this with an #undef.
+
+Bug: https://bugs.gentoo.org/789336
+---
+ src/seccomp.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/seccomp.c b/src/seccomp.c
+index 3318367c..eb8b1e57 100644
+--- a/src/seccomp.c
++++ b/src/seccomp.c
+@@ -179,6 +179,7 @@ enable_sandbox_full(void)
+ ALLOW_RULE(fstat);
+ ALLOW_RULE(fstat64);
+ #ifdef __NR_fstatat64
++#undef fstatat64
+ ALLOW_RULE(fstatat64);
+ #endif
+ ALLOW_RULE(futex);
+--
+2.32.0
+