aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuro Bystricky <juro.bystricky@intel.com>2015-08-20 14:00:21 -0700
committerJuro Bystricky <juro.bystricky@intel.com>2015-08-20 14:00:21 -0700
commit8a25608a2fbbff561bf62784997e179806d432da (patch)
tree0b378229b79caaef99fdc184be8fd2b2022f4af3
parentc2ff6c51391ff55aa2617bab111808f64d121a7c (diff)
downloadmeta-darwin-contrib-juro/dizzy/glib.tar.gz
meta-darwin-contrib-juro/dizzy/glib.tar.bz2
meta-darwin-contrib-juro/dizzy/glib.zip
glib-2.0: Patch to fix broken build for Darwinjuro/dizzy/glib
glib fails to build for Darwin. This patch fixes it. The origin/reason for the error is unclear, as the loop syntax seems correct, and presumably glib used to build before. So the culprit is probably the new gcc. Moving the initial assignemt from the "for" loop in front of the "for" loop seems to fix the problem (makes build possible). Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-rw-r--r--recipes-core/glib-2.0/files/gdummyfile_weirderror.patch24
-rw-r--r--recipes-core/glib-2.0/glib-2.0_%.bbappend3
2 files changed, 27 insertions, 0 deletions
diff --git a/recipes-core/glib-2.0/files/gdummyfile_weirderror.patch b/recipes-core/glib-2.0/files/gdummyfile_weirderror.patch
new file mode 100644
index 0000000..68e6152
--- /dev/null
+++ b/recipes-core/glib-2.0/files/gdummyfile_weirderror.patch
@@ -0,0 +1,24 @@
+Index: glib-2.40.0/gio/gdummyfile.c
+===================================================================
+--- glib-2.40.0.orig/gio/gdummyfile.c
++++ glib-2.40.0/gio/gdummyfile.c
+@@ -454,7 +454,8 @@ unescape_string (const gchar *escaped_st
+ result = g_malloc (escaped_string_end - escaped_string + 1);
+
+ out = result;
+- for (in = escaped_string; in < escaped_string_end; in++)
++ in = escaped_string;
++ for (; in < escaped_string_end; in++)
+ {
+ character = *in;
+ if (*in == '%')
+@@ -551,7 +552,8 @@ _g_decode_uri (const char *uri)
+
+ decoded->scheme = g_malloc (p - uri);
+ out = decoded->scheme;
+- for (in = uri; in < p - 1; in++)
++ in = uri;
++ for (; in < p - 1; in++)
+ *out++ = g_ascii_tolower (*in);
+ *out = 0;
+
diff --git a/recipes-core/glib-2.0/glib-2.0_%.bbappend b/recipes-core/glib-2.0/glib-2.0_%.bbappend
index a383441..3c98287 100644
--- a/recipes-core/glib-2.0/glib-2.0_%.bbappend
+++ b/recipes-core/glib-2.0/glib-2.0_%.bbappend
@@ -1,2 +1,5 @@
+SRC_URI_append_darwin = " file://gdummyfile_weirderror.patch \
+ "
EXTRA_OECONF_darwin = "--enable-included-printf=yes ${CORECONF}"
FILES_${PN}_append_darwin = " ${libdir}/charset.alias"
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"