From e1aa8cec038500371f1635b6664ba9ec30ffb985 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 22 Aug 2017 15:07:45 +0000 Subject: gnome: Fix build of Epiphany and GNOME Control Centre For some reason the configure scripts fail to pass `-std=gnu99` to GCC even though the code uses C99 features (and presumably GNU extensions, although I haven't checked that). This was leading to compile failures like this in Epiphany: ephy-filters-manager.c: In function 'remove_old_adblock_filters': ephy-filters-manager.c:207:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode for (GList *l = current_files; l != NULL; l = l->next) { ^ ephy-filters-manager.c:207:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code ephy-filters-manager.c: In function 'update_adblock_filter_files': ephy-filters-manager.c:244:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode for (guint i = 0; filters[i]; i++) { ^ Makefile:797: recipe for target 'libephymisc_la-ephy-filters-manager.lo' failed make[4]: *** [libephymisc_la-ephy-filters-manager.lo] Error 1 And similar things in GNOME Control Centre. --- gnome/strata/gnome/epiphany.morph | 2 +- gnome/strata/gnome/gnome-control-center.morph | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'gnome') diff --git a/gnome/strata/gnome/epiphany.morph b/gnome/strata/gnome/epiphany.morph index 736d89e0..3a47a1a2 100644 --- a/gnome/strata/gnome/epiphany.morph +++ b/gnome/strata/gnome/epiphany.morph @@ -2,4 +2,4 @@ name: epiphany kind: chunk build-system: autotools configure-commands: -- ./autogen.sh --prefix="$PREFIX" --sysconfdir=/etc --localstatedir=/var --disable-Werror +- CFLAGS="-std=gnu99" ./autogen.sh --prefix="$PREFIX" --sysconfdir=/etc --localstatedir=/var --disable-Werror diff --git a/gnome/strata/gnome/gnome-control-center.morph b/gnome/strata/gnome/gnome-control-center.morph index ec2b6409..9b5ec037 100644 --- a/gnome/strata/gnome/gnome-control-center.morph +++ b/gnome/strata/gnome/gnome-control-center.morph @@ -2,4 +2,4 @@ name: gnome-control-center kind: chunk build-system: autotools configure-commands: -- ./autogen.sh --prefix="$PREFIX" --sysconfdir=/etc --disable-documentation +- CFLAGS="-std=gnu99" ./autogen.sh --prefix="$PREFIX" --sysconfdir=/etc --disable-documentation -- cgit v1.2.1