GNOME Bugzilla – Bug 763567
libcompat.h: strsignal() should not be declared const
Last modified: 2016-08-18 18:10:30 UTC
Created attachment 323793 [details] [review] libcompat.h: strsignal() should be not be decleared const POSIX standards requires strsignal() to return a pointer to a char, not a const pointer to a char. [1] On uClibc, and possibly other libc's, that do not HAVE_DECL_STRSIGNAL, libcompat.h declares const char *strsignal (int sig) which causes a type error.
Downstream bug https://bugs.gentoo.org/show_bug.cgi?id=577312
I think we actually also need to copy these two lines to configure.ac: https://github.com/libcheck/check/blob/master/configure.ac#L295 Can you also provide this patch to libcheck? Thanks!
(In reply to Sebastian Dröge (slomo) from comment #2) > I think we actually also need to copy these two lines to configure.ac: > https://github.com/libcheck/check/blob/master/configure.ac#L295 > > Can you also provide this patch to libcheck? Thanks! Sorry for the delay in responding. I didn't know that that code was coming from libcheck. So yes, you need those lines from their configure.ac and the fix for libcompat's strsignal() should go to libcheck first and then get imported into gstreamer.
Pull request send to check on github: https://github.com/libcheck/check/pull/24
(In reply to Anthony G. Basile from comment #4) > Pull request send to check on github: > https://github.com/libcheck/check/pull/24 The fix was merged upstream in libcheck. Note that there was a typo in AC_CHECK_DECLS so you don't want to reproduce that when you copy that line to gstreamer.
Comment on attachment 323793 [details] [review] libcompat.h: strsignal() should be not be decleared const Attachment 323793 [details] pushed as d6e25dd - libcompat.h: strsignal() should be not be decleared const
Now someone just has to write the configure part of this.
I think we also need to remove the const declaration in gst/check/libcheck/strsignal.c . I had an issue when compiling 1.8.1 with mingw that is resolved by removing the 'const'.
Yes, didn't I push a patch for this? I know i have it somewhere, let me find it and push it.
Does someone need me to make a patch as mentioned in comment 7? Its easy, you just have to add the two lines in comment 2. BTW, why is gstreamer bundling libcheck rather than just depend on it and check for some function in libcheck in configure.ac with AC_SEARCH_LIBS().
commit c9da8b0e7f53005ab125e48165dae39fbfee2352 Author: Anthony G. Basile <blueness@gentoo.org> Date: Sun Mar 13 11:05:29 2016 -0400 libcompat.h: strsignal() should be not be decleared const
(In reply to Tim-Philipp Müller from comment #11) > commit c9da8b0e7f53005ab125e48165dae39fbfee2352 > Author: Anthony G. Basile <blueness@gentoo.org> > Date: Sun Mar 13 11:05:29 2016 -0400 > > libcompat.h: strsignal() should be not be decleared const The gstreamer commit at https://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=c9da8b0e7f53005ab125e48165dae39fbfee2352 does not match the libcheck commit at https://github.com/libcheck/check/commit/ab9bddc96dc604b3c396f77b059a403b97a9dbe3 You're missing the hunk for lib/libcompat.h
I think it's the other way round - we fixed that already but forgot this hunk? f1df7aba (Sebastian Rasmussen 2014-11-15 12:53:32 +0100 103) #if !HAVE_DECL_STRSIGNAL d6e25dde (Anthony G. Basile 2016-03-13 11:05:29 -0400 104) CK_DLL_EXP char *strsignal (int sig); f1df7aba (Sebastian Rasmussen 2014-11-15 12:53:32 +0100 105) #endif /* !HAVE_DECL_STRSIGNAL */
(In reply to Tim-Philipp Müller from comment #13) > I think it's the other way round - we fixed that already but forgot this > hunk? > oh i see what you did. sorry for the noise.
See https://bugzilla.gnome.org/show_bug.cgi?id=770103