diff --git a/0001-icy-include-stdlib-h-and-stdio-h.patch b/0001-icy-include-stdlib-h-and-stdio-h.patch new file mode 100644 index 0000000..e2ba700 --- /dev/null +++ b/0001-icy-include-stdlib-h-and-stdio-h.patch @@ -0,0 +1,26 @@ +From 8ab2de318d55c9d0987ffae7d9b94b365af732c1 Mon Sep 17 00:00:00 2001 +From: Alexandre Janniaux +Date: Wed, 14 Sep 2022 16:29:22 +0200 +Subject: [PATCH 1/2] icy: include stdlib.h and stdio.h + +malloc, free, and snprintf had no valid previous declaration, making the +build fail with clang. +--- + 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 ++#include /* for free() and malloc() */ ++#include /* for snprintf() */ + #include + + #include +-- +GitLab diff --git a/0002-legacy-include-stdlib-h.patch b/0002-legacy-include-stdlib-h.patch new file mode 100644 index 0000000..fd8b082 --- /dev/null +++ b/0002-legacy-include-stdlib-h.patch @@ -0,0 +1,25 @@ +From 600fa105a799986efcccddfedfdfd3e9a1988cd0 Mon Sep 17 00:00:00 2001 +From: Alexandre Janniaux +Date: Wed, 14 Sep 2022 16:30:03 +0200 +Subject: [PATCH 2/2] legacy: include stdlib.h + +free() had no previous declaration, making the build fail with clang. +--- + 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 /* for free() */ ++ + int shout_set_format(shout_t *self, unsigned int format) + { + if (!self) +-- +GitLab diff --git a/libshout.changes b/libshout.changes index 6ba0ff8..1761b74 100644 --- a/libshout.changes +++ b/libshout.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Mar 6 09:10:38 UTC 2024 - Takashi Iwai + +- Fix build errors with gcc14 (bsc#1220975): + 0001-icy-include-stdlib-h-and-stdio-h.patch + 0002-legacy-include-stdlib-h.patch + ------------------------------------------------------------------- Thu May 5 10:11:54 UTC 2022 - Christophe Giboudeaux diff --git a/libshout.spec b/libshout.spec index 2aaf7ee..8ee185a 100644 --- a/libshout.spec +++ b/libshout.spec @@ -1,7 +1,7 @@ # # spec file for package libshout # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,8 @@ URL: https://icecast.org/ #Git-Clone: https://gitlab.xiph.org/xiph/icecast-libshout/ Source: https://downloads.xiph.org/releases/libshout/%name-%version.tar.gz Source1: baselibs.conf +Patch1: 0001-icy-include-stdlib-h-and-stdio-h.patch +Patch2: 0002-legacy-include-stdlib-h.patch BuildRequires: libtool BuildRequires: pkgconfig(speex) BuildRequires: pkgconfig(theora)