mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-30 00:50:00 +00:00
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 <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
+33
@@ -0,0 +1,33 @@
|
|||||||
|
From 22bcf06637d64e40af6c152e28b31eef41e3f583 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
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 <raj.khem@gmail.com>
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
@@ -21,6 +21,7 @@ SRC_URI = "svn://omgps.googlecode.com/svn/trunk;module=omgps;protocol=http \
|
|||||||
file://use.unused.variable.patch \
|
file://use.unused.variable.patch \
|
||||||
file://fix.build.with.glib.2.34.patch \
|
file://fix.build.with.glib.2.34.patch \
|
||||||
file://gdk-pixbuf-2.26.5.patch \
|
file://gdk-pixbuf-2.26.5.patch \
|
||||||
|
file://0001-g_type_init-is-deprecated-for-glib-2.35.0.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
inherit autotools
|
inherit autotools
|
||||||
|
|||||||
Reference in New Issue
Block a user