Bug 1220975 - GCC 14: libshout package fails
Summary: GCC 14: libshout package fails
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Network (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Takashi Iwai
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: modern_C
  Show dependency treegraph
 
Reported: 2024-03-05 14:10 UTC by Michal Jireš
Modified: 2024-03-06 09:32 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Jireš 2024-03-05 14:10:02 UTC
Building libshout with GCC 14 fails here:
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/libshout/standard/x86_64

Due to:

legacy.c: In function 'shout_set_dumpfile':
legacy.c:78:9: error: implicit declaration of function 'free' [-Wimplicit-function-declaration]
   78 |         free(self->dumpfile);
      |         ^~~~
legacy.c:29:1: note: include '<stdlib.h>' or provide a declaration of 'free'
   28 | #include "shout_private.h"
  +++ |+#include <stdlib.h>
   29 | #include "util.h"
icy.c: In function 'shout_set_metadata_impl':
icy.c:81:17: error: implicit declaration of function 'free' [-Wimplicit-function-declaration]
   81 |                 free(encvalue);
      |                 ^~~~
icy.c:32:1: note: include '<stdlib.h>' or provide a declaration of 'free'
   31 | #include "shout_private.h"
  +++ |+#include <stdlib.h>
   32 | #include "util.h"
icy.c:87:21: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
   87 |             param = malloc(param_len);
      |                     ^~~~~~
icy.c:87:21: note: include '<stdlib.h>' or provide a declaration of 'malloc'
icy.c:93:13: error: implicit declaration of function 'snprintf' [-Wimplicit-function-declaration]
   93 |             snprintf(param, param_len, param_template, encpassword, encvalue);
      |             ^~~~~~~~
icy.c:32:1: note: include '<stdio.h>' or provide a declaration of 'snprintf'
   31 | #include "shout_private.h"
  +++ |+#include <stdio.h>
   32 | #include "util.h"


Builds with automatically generated:

Index: libshout-2.4.6/src/legacy.c
===================================================================
--- libshout-2.4.6.orig/src/legacy.c
+++ libshout-2.4.6/src/legacy.c
@@ -27,6 +27,7 @@

 #include "shout_private.h"
 #include "util.h"
+#include <stdlib.h>

 int shout_set_format(shout_t *self, unsigned int format)
 {
Index: libshout-2.4.6/src/icy.c
===================================================================
--- libshout-2.4.6.orig/src/icy.c
+++ libshout-2.4.6/src/icy.c
@@ -30,6 +30,8 @@

 #include "shout_private.h"
 #include "util.h"
+#include <stdio.h>
+#include <stdlib.h>

 shout_metadata_t *shout_metadata_new(void)
 {

See the meta bug#1220571 for more info.
Comment 1 Takashi Iwai 2024-03-06 09:03:57 UTC
There is a pending PR for addressing those in the upstream gitlab, left over a year:
  https://gitlab.xiph.org/xiph/icecast-libshout/-/merge_requests/4

I'll backport them.
Comment 2 Takashi Iwai 2024-03-06 09:32:10 UTC
The fix was submitted to FACTORY.