Skip to contentSkip to conversation

vlc: fix loop initial declarations are only allowed in C99 mode

PATCH New akuster 1 participant 2 messages Sep 2, 2020

lore
Share & tools
lore

akuster

author
#0 lore raw

PATCH 1/2 vlc: fix loop initial declarations are only allowed in C99 mode

build issue seen on CentOS7 and Aarch64 machine

Fixes:
../../vlc-3.0.9.2/src/misc/fourcc_gen.c:75:5: error: ‘for’ loop initial declarations are only allowed in C99 mode

|      for (size_t i = 0; i < n; i++)
|      ^
| ../../vlc-3.0.9.2/src/misc/fourcc_gen.c:75:5: note: use option -std=c99 or -std=gnu99 to compile your code
---
 meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb +1 -1
index f6c7a606d5..b1aa82cc89 100644
@@ -30,7 +30,7 @@ inherit autotools features_check gettext pkgconfig mime-xdg
 
 REQUIRED_DISTRO_FEATURES = "x11"
 
-export BUILDCC = "${BUILD_CC}"
+export BUILDCC = "${BUILD_CC} -std=c99"
 EXTRA_OECONF = "\
     --enable-run-as-root \
     --enable-xvideo \
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/2 babl-native: fix build issue

../babl-0.1.74/babl/babl-fish-reference.c:1064:7: error: ‘for’ loop initial declarations are only allowed in C99 mode

|        for (int i = 0; i < n; i++)
|        ^
| ../babl-0.1.74/babl/babl-fish-reference.c:1064:7: note: use option -std=c99 or -std=gnu99 to compile your code

Fails on CentOS7 with Arch64

---
 meta-gnome/recipes-gimp/babl/babl_0.1.74.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-gnome/recipes-gimp/babl/babl_0.1.74.bb +2 -0
index c470987b4f..9b405be0b3 100644
@@ -10,6 +10,8 @@ inherit setuptools3 gnomebase gobject-introspection
 
 DEPENDS += "lcms"
 
+CFLAGS_append_class-native = " -std=gnu99"
+
 # https://bugs.llvm.org/show_bug.cgi?id=45555
 CFLAGS_append_toolchain-clang_mipsarch = " -ffp-exception-behavior=ignore "
 CFLAGS_append_toolchain-clang_riscv64 = " -ffp-exception-behavior=ignore "
Signature · 1 line
2.17.1