summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2017-08-22 15:07:45 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2017-08-24 12:45:13 +0000
commite1aa8cec038500371f1635b6664ba9ec30ffb985 (patch)
tree281a87ad47234fe65c7a3aa0500f05a78319cb1e
parent6ddd65e33cb907b4cdaceb5c3f02d5f911794ef1 (diff)
downloaddefinitions-e1aa8cec038500371f1635b6664ba9ec30ffb985.tar.gz
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.
-rw-r--r--gnome/strata/gnome/epiphany.morph2
-rw-r--r--gnome/strata/gnome/gnome-control-center.morph2
2 files changed, 2 insertions, 2 deletions
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