omgps: Fix build with glib-2.0 > 2.35
PATCH 1/1 omgps: Fix build with glib-2.0 > 2.35
Fix errors like
| src/main.c: In function 'main':
| src/main.c:490:2: error: 'g_type_init' is deprecated (declared at /builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/qemuarm/usr/include/glib-2.0/gobject/gtype.h:669) [-Werror=deprecated-declarations]
| g_type_init(); | ^ | cc1: all warnings being treated as errors | make[1]: *** [omgps-main.o] Error 1
Signed-off-by Khem Raj <[email protected]>
--- ...g_type_init-is-deprecated-for-glib-2.35.0.patch | 33 ++++++++++++++++++++ meta-oe/recipes-navigation/omgps/omgps_svn.bb | 1 + 2 files changed, 34 insertions(+) create mode 100644 meta-oe/recipes-navigation/omgps/omgps/0001-g_type_init-is-deprecated-for-glib-2.35.0.patch
meta-oe/recipes-navigation/omgps/omgps/0001-g_type_init-is-deprecated-for-glib-2.35.0.patch new file +33 -0
@@ -0,0 +1,33 @@ +From 22bcf06637d64e40af6c152e28b31eef41e3f583 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 13 Jun 2013 02:35:22 -0700 +Subject: [PATCH] g_type_init() is deprecated for glib >= 2.35.0 + +Call it for old versions. + +Signed-off-by: Khem Raj <[email protected]> + +Upstream-Status: Pending +--- + src/main.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/main.c b/src/main.c +index e984da4..a63ddf3 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -486,9 +486,9 @@ int main(int argc, char **argv) + if (strcmp(argv[1], "-log2file") == 0) + log2console = FALSE; + } +- ++#if !GLIB_CHECK_VERSION(2,35,0) + g_type_init(); +- ++#endif + gdk_threads_init(); + + gdk_threads_enter(); +-- +1.7.9.5 +
meta-oe/recipes-navigation/omgps/omgps_svn.bb +1 -0
@@ -21,6 +21,7 @@ SRC_URI = "svn://omgps.googlecode.com/svn/trunk;module=omgps;protocol=http \ file://use.unused.variable.patch \ file://fix.build.with.glib.2.34.patch \ file://gdk-pixbuf-2.26.5.patch \ + file://0001-g_type_init-is-deprecated-for-glib-2.35.0.patch \ " inherit autotools
Signature · 1 line
1.7.9.5