From: Zoltan Varga Date: Mon, 15 Apr 2013 20:24:22 +0000 (+0200) Subject: Fix the win64 build. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=2975c3c9b5f8e741702591824107b07e6510ae0a;p=mono.git Fix the win64 build. --- diff --git a/mono/metadata/threads.c b/mono/metadata/threads.c index e0ba2fde306..20820ba4fa9 100644 --- a/mono/metadata/threads.c +++ b/mono/metadata/threads.c @@ -806,7 +806,7 @@ mono_thread_create (MonoDomain *domain, gpointer func, gpointer arg) mono_thread_create_internal (domain, func, arg, FALSE, FALSE, 0); } -#if defined(HOST_WIN32) && defined(__GNUC__) +#if defined(HOST_WIN32) && defined(__GNUC__) && defined(TARGET_X86) static __inline__ __attribute__((always_inline)) /* This is not defined by gcc */ unsigned long long @@ -837,6 +837,7 @@ mono_thread_get_stack_bounds (guint8 **staddr, size_t *stsize) return; /* FIXME: simplify the mess below */ #elif defined(HOST_WIN32) +#ifdef TARGET_X86 /* http://en.wikipedia.org/wiki/Win32_Thread_Information_Block */ void* tib = (void*)__readfsdword(0x18); guint8 *stackTop = (guint8*)*(int*)((char*)tib + 4); @@ -844,6 +845,10 @@ mono_thread_get_stack_bounds (guint8 **staddr, size_t *stsize) *staddr = stackBottom; *stsize = stackTop - stackBottom; +#else + *staddr = NULL; + *stsize = (size_t)-1; +#endif return; #else pthread_attr_t attr;