Skip to content
Snippets Groups Projects
Commit cf327060 authored by Simon McVittie's avatar Simon McVittie
Browse files

utils: Ensure that g_type_init() gets called


In GLib < 2.36, this wasn't automatic.

The constructor has been backported into the SteamRT 1 'scout' version
of GLib, but if you have an environment with more Ubuntu 12.04
apt sources available (like the official SDK schroot from
setup_chroot.sh), they might override the SteamRT-patched version.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 84ec4222
No related branches found
No related tags found
1 merge request!16utils: Ensure that g_type_init() gets called
Pipeline #1275 passed
......@@ -29,6 +29,8 @@
#include <link.h>
#include <string.h>
#include <glib-object.h>
static gchar *helpers_path = NULL;
G_GNUC_INTERNAL const char *
......@@ -95,3 +97,12 @@ out:
return path;
}
#if !GLIB_CHECK_VERSION(2, 36, 0)
static void _srt_constructor (void) __attribute__((__constructor__));
static void
_srt_constructor (void)
{
g_type_init ();
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment