mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-14 17:40:07 +02:00
glib/tests/private.c: Fix compilation on Windows
-process.h must be included for _beginthreadex -Use a cast to HANDLE on _beginthreadex to silence warnings on different types
This commit is contained in:
@@ -114,6 +114,7 @@ private3_free (gpointer data)
|
|||||||
|
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <process.h>
|
||||||
|
|
||||||
static guint __stdcall
|
static guint __stdcall
|
||||||
#else
|
#else
|
||||||
@@ -139,7 +140,7 @@ test_private3 (void)
|
|||||||
{
|
{
|
||||||
HANDLE thread;
|
HANDLE thread;
|
||||||
guint ignore;
|
guint ignore;
|
||||||
thread = _beginthreadex (NULL, 0, private3_func, NULL, 0, &ignore);
|
thread = (HANDLE) _beginthreadex (NULL, 0, private3_func, NULL, 0, &ignore);
|
||||||
WaitForSingleObject (thread, INFINITE);
|
WaitForSingleObject (thread, INFINITE);
|
||||||
CloseHandle (thread);
|
CloseHandle (thread);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user