From 5437525a1b0b5839ea0e45550905aca016b88713 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Thu, 17 Mar 2016 14:05:58 +0100 Subject: [PATCH] s3:mdssvc: older glib2 versions require g_type_init() Older glib2 versions will crash if g_type_init is not called: (process:6712): GLib-GObject-CRITICAL **: ... ./gobject/gtype.c:2722: You forgot to call g_type_init() Bug: https://bugzilla.samba.org/show_bug.cgi?id=11801 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Fri Mar 18 03:52:55 CET 2016 on sn-devel-144 (cherry picked from commit 3563d79a8cb625ae78523cb32330c9f61c6c3a2f) --- source3/rpc_server/mdssvc/mdssvc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source3/rpc_server/mdssvc/mdssvc.c b/source3/rpc_server/mdssvc/mdssvc.c index abfea433e05..44d770399b6 100644 --- a/source3/rpc_server/mdssvc/mdssvc.c +++ b/source3/rpc_server/mdssvc/mdssvc.c @@ -1783,10 +1783,13 @@ done: } /** - * Init callbacks at startup, nothing to do here really + * Init callbacks at startup **/ bool mds_init(struct messaging_context *msg_ctx) { +#if (GLIB_MAJOR_VERSION < 3) && (GLIB_MINOR_VERSION < 36) + g_type_init(); +#endif return true; } -- 2.11.4.GIT