[Buildroot] [PATCH 1/1] package/libshout: fix build with gcc >= 14.x

Thomas Perale thomas.perale at mind.be
Thu Oct 30 08:23:44 UTC 2025


In reply of:
> Fixes:
> https://autobuild.buildroot.net/results/c53/c53b7b613269acddd3467865c11784f59062a943/
> 
> Signed-off-by: Bernd Kuhls <bernd at kuhls.net>

Applied to 2025.02.x & 2025.08.x. Thanks

> ---
>  ...001-icy-include-stdlib.h-and-stdio.h.patch | 31 +++++++++++++++++++
>  .../0002-legacy-include-stdlib.h.patch        | 30 ++++++++++++++++++
>  2 files changed, 61 insertions(+)
>  create mode 100644 package/libshout/0001-icy-include-stdlib.h-and-stdio.h.patch
>  create mode 100644 package/libshout/0002-legacy-include-stdlib.h.patch
> 
> diff --git a/package/libshout/0001-icy-include-stdlib.h-and-stdio.h.patch b/package/libshout/0001-icy-include-stdlib.h-and-stdio.h.patch
> new file mode 100644
> index 0000000000..cf3f02bae9
> --- /dev/null
> +++ b/package/libshout/0001-icy-include-stdlib.h-and-stdio.h.patch
> @@ -0,0 +1,31 @@
> +From 3ea67b511bdf4f12b3d5de4d7e133badf8c18d54 Mon Sep 17 00:00:00 2001
> +From: Alexandre Janniaux <ajanni at videolabs.io>
> +Date: Wed, 14 Sep 2022 16:29:22 +0200
> +Subject: [PATCH] icy: include stdlib.h and stdio.h
> +
> +malloc, free, and snprintf had no valid previous declaration, making the
> +build fail with clang.
> +
> +Upstream: https://gitlab.xiph.org/xiph/icecast-libshout/-/merge_requests/4
> +
> +Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
> +---
> + src/icy.c | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/src/icy.c b/src/icy.c
> +index 8e83552..4de3c14 100644
> +--- a/src/icy.c
> ++++ b/src/icy.c
> +@@ -24,6 +24,8 @@
> + #endif
> + 
> + #include <stdbool.h>
> ++#include <stdlib.h> /* for free() and malloc() */
> ++#include <stdio.h> /* for snprintf() */
> + #include <string.h>
> + 
> + #include <shout/shout.h>
> +-- 
> +2.47.3
> +
> diff --git a/package/libshout/0002-legacy-include-stdlib.h.patch b/package/libshout/0002-legacy-include-stdlib.h.patch
> new file mode 100644
> index 0000000000..863d8095c8
> --- /dev/null
> +++ b/package/libshout/0002-legacy-include-stdlib.h.patch
> @@ -0,0 +1,30 @@
> +From 1742df325b52eef5af32c40893d821f895dc9d88 Mon Sep 17 00:00:00 2001
> +From: Alexandre Janniaux <ajanni at videolabs.io>
> +Date: Wed, 14 Sep 2022 16:30:03 +0200
> +Subject: [PATCH] legacy: include stdlib.h
> +
> +free() had no previous declaration, making the build fail with clang.
> +
> +Upstream: https://gitlab.xiph.org/xiph/icecast-libshout/-/merge_requests/4
> +
> +Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
> +---
> + src/legacy.c | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/src/legacy.c b/src/legacy.c
> +index 3e1d3d7..e0ed961 100644
> +--- a/src/legacy.c
> ++++ b/src/legacy.c
> +@@ -28,6 +28,8 @@
> + #include "shout_private.h"
> + #include "util.h"
> + 
> ++#include <stdlib.h> /* for free() */
> ++
> + int shout_set_format(shout_t *self, unsigned int format)
> + {
> +     if (!self)
> +-- 
> +2.47.3
> +
> -- 
> 2.47.3
> 
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot


More information about the buildroot mailing list