Skip to content

Commit

Permalink
package/file: fix musl compile issue
Browse files Browse the repository at this point in the history
It is not totally clear which update is responsible for the
breakage. The breakage has been occurring for as long as Jan 2022.
Therefore it should be backported to older supported buildroot releases.

Add a patch from Gentoo people, also reported Upstream to fix the
issue.

Fixes:

 http://autobuild.buildroot.org/results/abf/abfe66cec3680d396c5774ba492f34599e513edc/

Signed-off-by: Waldemar Brodkorb <[email protected]>
Signed-off-by: Thomas Petazzoni <[email protected]>
  • Loading branch information
wbx-github authored and tpetazzoni committed Oct 26, 2024
1 parent 868d30c commit 71f36ef
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions package/file/0001-file-seccomp-fstatat64-musl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From 8c13923a8e17a02be0989649b2edc20124816729 Mon Sep 17 00:00:00 2001
From: Mike Gilbert <[email protected]>
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
Bug: https://bugs.astron.com/view.php?id=473
Signed-off-by: Mike Gilbert <[email protected]>
Signed-off-by: Waldemar Brodkorb <[email protected]>
Upstream: N/A under discussion
---
src/seccomp.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/seccomp.c b/src/seccomp.c
index 5a39ee45..d2a1139a 100644
--- a/src/seccomp.c
+++ b/src/seccomp.c
@@ -205,6 +205,7 @@ enable_sandbox_full(void)
#endif
ALLOW_RULE(fstat64);
#ifdef __NR_fstatat64
+#undef fstatat64
ALLOW_RULE(fstatat64);
#endif
ALLOW_RULE(futex);

0 comments on commit 71f36ef

Please sign in to comment.