From 114b1ccf78849988567011c36dd5e868a66a3431 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Thu, 18 Jul 2013 17:22:53 +0800 Subject: [PATCH] gsourceclosure.c: Fix build on Windows GPid is a HANDLE (aka void *) on Windows, not an int, so treat pid accordingly on Windows, as using pid as a gulong directly would likely be undesirable on Windows https://bugzilla.gnome.org/show_bug.cgi?id=704447 --- gobject/gsourceclosure.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gobject/gsourceclosure.c b/gobject/gsourceclosure.c index a16b6c5..f6be8de 100644 --- a/gobject/gsourceclosure.c +++ b/gobject/gsourceclosure.c @@ -117,8 +117,14 @@ g_child_watch_closure_callback (GPid pid, g_value_init (&result_value, G_TYPE_BOOLEAN); +#ifdef G_OS_UNIX g_value_init (¶ms[0], G_TYPE_ULONG); g_value_set_ulong (¶ms[0], pid); +#endif +#ifdef G_OS_WIN32 + g_value_init (¶ms[0], G_TYPE_POINTER); + g_value_set_pointer (¶ms[0], pid); +#endif g_value_init (¶ms[1], G_TYPE_INT); g_value_set_int (¶ms[1], status); -- 2.7.4