ntdll: Fix the Mac build with SDKs older than 10.14.

Also, fix some warnings with the 10.14 SDK.
Thanks to Gijs Vermeulen for reporting the issue.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Ken Thomases 2019-09-16 13:42:06 -05:00 committed by Alexandre Julliard
parent 78beca7887
commit bed4291336

View file

@ -55,6 +55,9 @@
# define UNW_LOCAL_ONLY
# include <libunwind.h>
#endif
#ifdef __APPLE__
# include <mach/mach.h>
#endif
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
@ -3209,10 +3212,10 @@ static void *mac_thread_gsbase(void)
static int gsbase_offset = -1;
void *ret;
kern_return_t kr = thread_info(mach_thread_self(), THREAD_IDENTIFIER_INFO, (thread_identifier_info_t) &tiinfo, &info_count);
kern_return_t kr = thread_info(mach_thread_self(), THREAD_IDENTIFIER_INFO, (thread_info_t) &tiinfo, &info_count);
if (kr == KERN_SUCCESS)
{
TRACE("pthread_self() %p thread ID %lx gsbase %lx\n", pthread_self(), tiinfo.thread_id, tiinfo.thread_handle);
TRACE("pthread_self() %p thread ID %llx gsbase %llx\n", pthread_self(), tiinfo.thread_id, tiinfo.thread_handle);
return (void*)tiinfo.thread_handle;
}