Fix thd_join on win64

This commit is contained in:
Mike Hommey 2014-05-29 09:03:00 +09:00 committed by Jason Evans
parent 1f6d77e1f6
commit 999e1b5cc7

View File

@ -14,8 +14,11 @@ void
thd_join(thd_t thd, void **ret)
{
if (WaitForSingleObject(thd, INFINITE) == WAIT_OBJECT_0 && ret)
GetExitCodeThread(thd, (LPDWORD) ret);
if (WaitForSingleObject(thd, INFINITE) == WAIT_OBJECT_0 && ret) {
DWORD exit_code;
GetExitCodeThread(thd, (LPDWORD) &exit_code);
*ret = (void *)(uintptr_t)exit_code;
}
}
#else