From 695f5b96aec13d6808303c6da8658d9f7be59954 Mon Sep 17 00:00:00 2001 From: "Gergely Polonkai (W00d5t0ck)" Date: Sat, 5 Oct 2013 02:11:12 +0200 Subject: [PATCH] Initialize GLib type system when necessary With 2.36 it became deprecated, as the type system is initialized automatically. Before that version, just call g_type_init() from gswe_init() --- src/swe-glib.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/swe-glib.c b/src/swe-glib.c index cf167f1..fe109f1 100644 --- a/src/swe-glib.c +++ b/src/swe-glib.c @@ -119,6 +119,11 @@ gswe_init(void) GsweAspectInfo *aspect_info; GsweAntiscionAxisInfo *antiscion_axis_info; + /* Before 2.34, g_type_init() must have been called. Let's do it! */ +#if !GLIB_CHECK_VERSION(2, 36, 0) + g_type_init(); +#endif + if (gswe_initialized) { return; }