* [Buildroot] [PATCH 1/1] package/libapparmor: fix build on musl
@ 2020-10-15 16:24 Fabrice Fontaine
2020-10-15 18:14 ` Thomas Petazzoni
2020-10-15 20:56 ` Thomas Petazzoni
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2020-10-15 16:24 UTC (permalink / raw)
To: buildroot
Fix build of version 3.0.0 with musl
Fixes:
- http://autobuild.buildroot.org/results/22fb440240aa698acc68f026be790d5366c8f908
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...or-add-missing-include-for-socklen_t.patch | 35 +++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 package/libapparmor/0001-libapparmor-add-missing-include-for-socklen_t.patch
diff --git a/package/libapparmor/0001-libapparmor-add-missing-include-for-socklen_t.patch b/package/libapparmor/0001-libapparmor-add-missing-include-for-socklen_t.patch
new file mode 100644
index 0000000000..2d5114337e
--- /dev/null
+++ b/package/libapparmor/0001-libapparmor-add-missing-include-for-socklen_t.patch
@@ -0,0 +1,35 @@
+From 47263a3a74d7973e7a54b17db6aa903701468ffd Mon Sep 17 00:00:00 2001
+From: Patrick Steinhardt <ps@pks.im>
+Date: Sat, 3 Oct 2020 20:37:55 +0200
+Subject: [PATCH] libapparmor: add missing include for `socklen_t`
+
+While `include/sys/apparmor.h` makes use of `socklen_t`, it doesn't
+include the `<sys/socket.h>` header to make its declaration available.
+While this works on systems using glibc via transitive includes, it
+breaks compilation on musl libc.
+
+Fix the issue by including the header.
+
+Signed-off-by: Patrick Steinhardt <ps@pks.im>
+[Retrieved from:
+https://gitlab.com/apparmor/apparmor/-/commit/47263a3a74d7973e7a54b17db6aa903701468ffd]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ libraries/libapparmor/include/sys/apparmor.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libraries/libapparmor/include/sys/apparmor.h b/libraries/libapparmor/include/sys/apparmor.h
+index 32892d065..d70eff947 100644
+--- a/libraries/libapparmor/include/sys/apparmor.h
++++ b/libraries/libapparmor/include/sys/apparmor.h
+@@ -21,6 +21,7 @@
+ #include <stdbool.h>
+ #include <stdint.h>
+ #include <unistd.h>
++#include <sys/socket.h>
+ #include <sys/types.h>
+
+ #ifdef __cplusplus
+--
+GitLab
+
--
2.28.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] package/libapparmor: fix build on musl
2020-10-15 16:24 [Buildroot] [PATCH 1/1] package/libapparmor: fix build on musl Fabrice Fontaine
@ 2020-10-15 18:14 ` Thomas Petazzoni
2020-10-15 20:56 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2020-10-15 18:14 UTC (permalink / raw)
To: buildroot
On Thu, 15 Oct 2020 18:24:13 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Fix build of version 3.0.0 with musl
>
> Fixes:
> - http://autobuild.buildroot.org/results/22fb440240aa698acc68f026be790d5366c8f908
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> ...or-add-missing-include-for-socklen_t.patch | 35 +++++++++++++++++++
> 1 file changed, 35 insertions(+)
> create mode 100644 package/libapparmor/0001-libapparmor-add-missing-include-for-socklen_t.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] package/libapparmor: fix build on musl
2020-10-15 16:24 [Buildroot] [PATCH 1/1] package/libapparmor: fix build on musl Fabrice Fontaine
2020-10-15 18:14 ` Thomas Petazzoni
@ 2020-10-15 20:56 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2020-10-15 20:56 UTC (permalink / raw)
To: buildroot
On Thu, 15 Oct 2020 18:24:13 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Fix build of version 3.0.0 with musl
>
> Fixes:
> - http://autobuild.buildroot.org/results/22fb440240aa698acc68f026be790d5366c8f908
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
After discussing with Yann, I in fact changing something when applying:
I moved the patch in package/libapparmor/3.0.0 and made
package/apparmor/3.0.0 a symlink to package/libapparmor/3.0.0.
Indeed, both apparmor and libapparmor use the same source tarball, so
it makes sense for them to share the patches.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-15 20:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-15 16:24 [Buildroot] [PATCH 1/1] package/libapparmor: fix build on musl Fabrice Fontaine
2020-10-15 18:14 ` Thomas Petazzoni
2020-10-15 20:56 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox