glib/tests/private.c: Fix compilation on Windows
authorChun-wei Fan <fanchunwei@src.gnome.org>
Wed, 21 Dec 2011 03:24:09 +0000 (11:24 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Thu, 22 Dec 2011 02:39:05 +0000 (10:39 +0800)
-process.h must be included for _beginthreadex
-Use a cast to HANDLE on _beginthreadex to silence warnings on different
 types

glib/tests/private.c

index c21aacf..cacf3f5 100644 (file)
@@ -114,6 +114,7 @@ private3_free (gpointer data)
 
 #ifdef G_OS_WIN32
 #include <windows.h>
+#include <process.h>
 
 static guint __stdcall
 #else
@@ -139,7 +140,7 @@ test_private3 (void)
   {
     HANDLE thread;
     guint ignore;
-    thread = _beginthreadex (NULL, 0, private3_func, NULL, 0, &ignore);
+    thread = (HANDLE) _beginthreadex (NULL, 0, private3_func, NULL, 0, &ignore);
     WaitForSingleObject (thread, INFINITE);
     CloseHandle (thread);
   }