* [Buildroot] [PATCH v2] package/file: fix musl compile issue
@ 2024-08-28 7:25 Waldemar Brodkorb
2024-10-26 21:27 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Waldemar Brodkorb @ 2024-08-28 7:25 UTC (permalink / raw)
To: buildroot
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 <wbx@openadk.org>
---
v1->v2:
- rework commit message suggested by Thomas Petazzoni
---
.../0001-file-seccomp-fstatat64-musl.patch | 32 +++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 package/file/0001-file-seccomp-fstatat64-musl.patch
diff --git a/package/file/0001-file-seccomp-fstatat64-musl.patch b/package/file/0001-file-seccomp-fstatat64-musl.patch
new file mode 100644
index 0000000000..ecb12fe44e
--- /dev/null
+++ b/package/file/0001-file-seccomp-fstatat64-musl.patch
@@ -0,0 +1,32 @@
+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
+Bug: https://bugs.astron.com/view.php?id=473
+Signed-off-by: Mike Gilbert <floppym@gentoo.org>
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+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);
--
2.30.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH v2] package/file: fix musl compile issue
2024-08-28 7:25 [Buildroot] [PATCH v2] package/file: fix musl compile issue Waldemar Brodkorb
@ 2024-10-26 21:27 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-10-26 21:27 UTC (permalink / raw)
To: Waldemar Brodkorb; +Cc: buildroot
On Wed, 28 Aug 2024 09:25:39 +0200
Waldemar Brodkorb <wbx@openadk.org> wrote:
> 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 <wbx@openadk.org>
> ---
> v1->v2:
> - rework commit message suggested by Thomas Petazzoni
> ---
> .../0001-file-seccomp-fstatat64-musl.patch | 32 +++++++++++++++++++
> 1 file changed, 32 insertions(+)
> create mode 100644 package/file/0001-file-seccomp-fstatat64-musl.patch
I am not a big fan of non-upstreamable patches, especially as the real
issue seems to come from musl itself (as acknowledged by Rich Felker).
But OK, let's move forward, so I merged this.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-26 21:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-28 7:25 [Buildroot] [PATCH v2] package/file: fix musl compile issue Waldemar Brodkorb
2024-10-26 21:27 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox