* [Buildroot] [PATCH 1/1] package/libselinux: fix uclibc build
@ 2024-05-11 6:19 Fabrice Fontaine
2024-05-11 6:58 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2024-05-11 6:19 UTC (permalink / raw)
To: buildroot; +Cc: Marcus Folkesson, Antoine Tenart, Fabrice Fontaine
Fix the following uclibc build failure raised since bump to version 3.6
in commit 5f7275787ab1520c3d3f7eb9d2bd1b9f5ff41443 and
https://github.com/SELinuxProject/selinux/commit/cb8289c2b237e5f66e4a7608ecc6c68abeaeaf55:
selinux_internal.c: In function 'reallocarray':
selinux_internal.c:25:29: error: 'SIZE_MAX' undeclared (first use in this function)
25 | if (size && nmemb > SIZE_MAX / size) {
| ^~~~~~~~
selinux_internal.c:6:1: note: 'SIZE_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?
5 | #include <string.h>
+++ |+#include <stdint.h>
6 |
selinux_internal.c:25:29: note: each undeclared identifier is reported only once for each function it appears in
25 | if (size && nmemb > SIZE_MAX / size) {
| ^~~~~~~~
Fixes: 5f7275787ab1520c3d3f7eb9d2bd1b9f5ff41443
- http://autobuild.buildroot.org/results/7e627744beaa4f7fdfd488dfacbaafc074a999f7
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...se_linux_internal.c-include-stdint.h.patch | 45 +++++++++++++++++++
1 file changed, 45 insertions(+)
create mode 100644 package/libselinux/0002-libselinux-src-se_linux_internal.c-include-stdint.h.patch
diff --git a/package/libselinux/0002-libselinux-src-se_linux_internal.c-include-stdint.h.patch b/package/libselinux/0002-libselinux-src-se_linux_internal.c-include-stdint.h.patch
new file mode 100644
index 0000000000..a626370a1b
--- /dev/null
+++ b/package/libselinux/0002-libselinux-src-se_linux_internal.c-include-stdint.h.patch
@@ -0,0 +1,45 @@
+From f6143706e2fc0f1ae16cb3667722deb9cc51c244 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sat, 11 May 2024 08:09:38 +0200
+Subject: [PATCH] libselinux/src/se_linux_internal.c: include stdint.h
+
+Include stdint.h to avoid the following uclibc build failure raised
+since version 3.6 and
+https://github.com/SELinuxProject/selinux/commit/cb8289c2b237e5f66e4a7608ecc6c68abeaeaf55:
+
+selinux_internal.c: In function 'reallocarray':
+selinux_internal.c:25:29: error: 'SIZE_MAX' undeclared (first use in this function)
+ 25 | if (size && nmemb > SIZE_MAX / size) {
+ | ^~~~~~~~
+selinux_internal.c:6:1: note: 'SIZE_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?
+ 5 | #include <string.h>
+ +++ |+#include <stdint.h>
+ 6 |
+selinux_internal.c:25:29: note: each undeclared identifier is reported only once for each function it appears in
+ 25 | if (size && nmemb > SIZE_MAX / size) {
+ | ^~~~~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/7e627744beaa4f7fdfd488dfacbaafc074a999f7
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Upstream: https://github.com/SELinuxProject/selinux/pull/435
+---
+ libselinux/src/selinux_internal.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/selinux_internal.c b/src/selinux_internal.c
+index 06852359..f6385908 100644
+--- a/src/selinux_internal.c
++++ b/src/selinux_internal.c
+@@ -1,6 +1,7 @@
+ #include "selinux_internal.h"
+
+ #include <errno.h>
++#include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
+
+--
+2.43.0
+
--
2.43.0
_______________________________________________
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 1/1] package/libselinux: fix uclibc build
2024-05-11 6:19 [Buildroot] [PATCH 1/1] package/libselinux: fix uclibc build Fabrice Fontaine
@ 2024-05-11 6:58 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-05-11 6:58 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Marcus Folkesson, Antoine Tenart, buildroot
On Sat, 11 May 2024 08:19:31 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Fix the following uclibc build failure raised since bump to version 3.6
> in commit 5f7275787ab1520c3d3f7eb9d2bd1b9f5ff41443 and
> https://github.com/SELinuxProject/selinux/commit/cb8289c2b237e5f66e4a7608ecc6c68abeaeaf55:
>
> selinux_internal.c: In function 'reallocarray':
> selinux_internal.c:25:29: error: 'SIZE_MAX' undeclared (first use in this function)
> 25 | if (size && nmemb > SIZE_MAX / size) {
> | ^~~~~~~~
> selinux_internal.c:6:1: note: 'SIZE_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?
> 5 | #include <string.h>
> +++ |+#include <stdint.h>
> 6 |
> selinux_internal.c:25:29: note: each undeclared identifier is reported only once for each function it appears in
> 25 | if (size && nmemb > SIZE_MAX / size) {
> | ^~~~~~~~
>
> Fixes: 5f7275787ab1520c3d3f7eb9d2bd1b9f5ff41443
> - http://autobuild.buildroot.org/results/7e627744beaa4f7fdfd488dfacbaafc074a999f7
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> ...se_linux_internal.c-include-stdint.h.patch | 45 +++++++++++++++++++
> 1 file changed, 45 insertions(+)
> create mode 100644 package/libselinux/0002-libselinux-src-se_linux_internal.c-include-stdint.h.patch
Applied to master, thanks.
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-05-11 6:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-11 6:19 [Buildroot] [PATCH 1/1] package/libselinux: fix uclibc build Fabrice Fontaine
2024-05-11 6:58 ` Thomas Petazzoni via buildroot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.