package/gstreamer1/gst1-plugins-bad: explicitly enable C99 for dvbsubenc/gcc 4.8
authorPeter Korsgaard <peter@korsgaard.com>
Tue, 10 Nov 2020 08:46:00 +0000 (09:46 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 10 Nov 2020 08:46:00 +0000 (09:46 +0100)
dvbsubenc fails to build with gcc 4.8 due to restrict keyword and for
loop declarations:

../gst/dvbsubenc/libimagequant/blur.c:10:46: error: expected ';', ',' or ')' before 'src'
 transposing_1d_blur (unsigned char *restrict src, unsigned char *restrict dst,
                                              ^
../gst/dvbsubenc/libimagequant/blur.c: In function 'liq_min3':
../gst/dvbsubenc/libimagequant/blur.c:101:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (unsigned int i = 0; i < width - 1; i++) {
     ^
../gst/dvbsubenc/libimagequant/blur.c:101:5: note: use option -std=c99 or -std=gnu99 to compile your code

Fixes:
 - http://autobuild.buildroot.org/results/183e876d63340b5c204f47a4653cbfebb0523277

Both of which are C99 features, so explicitly enable C99 support to fix
that.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk

index 78a3785449952cc09cda928561f67befd61e8ba8..86aa345b00ac48c24d9450e72a1f40c1eaa1e6d9 100644 (file)
@@ -13,6 +13,7 @@ GST1_PLUGINS_BAD_INSTALL_STAGING = YES
 GST1_PLUGINS_BAD_LICENSE_FILES = COPYING
 GST1_PLUGINS_BAD_LICENSE = LGPL-2.0+
 
+GST1_PLUGINS_BAD_CFLAGS = $(TARGET_CFLAGS) -std=c99
 GST1_PLUGINS_BAD_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)
 
 GST1_PLUGINS_BAD_CONF_OPTS = \