diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 442516e5986c6309378f01f826731684b5677c54..1e41e4d9bc0d621a68060ef01cf568669eaf7f7b 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -144,7 +144,7 @@ @ stdcall NtCreateTimer(ptr long ptr long) @ stub NtCreateToken # @ stub NtCreateWaitablePort -@ stdcall NtCurrentTeb() +@ stdcall -arch=i386,sparc,alpha,powerpc NtCurrentTeb() # @ stub NtDebugActiveProcess # @ stub NtDebugContinue @ stdcall NtDelayExecution(long ptr) diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 65a27edc68b1b12344ef60ab6b301f9a5c7b957d..89d5ce9d8cb5ab442f714b8757012f7c944911bb 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -1465,6 +1465,10 @@ __ASM_GLOBAL_FUNC( NtCurrentTeb, ".byte 0x64\n\tmovl 0x18,%eax\n\tret" ) /* Nothing needs to be done. MS C "magically" exports the inline version from winnt.h */ +#elif defined(__x86_64__) && defined(__GNUC__) + +/* not exported on x86_64 */ + #else /**********************************************************************/ diff --git a/include/winnt.h b/include/winnt.h index 580c2e55d095d5ae30363df17eda7182e0302a87..0c8e0a96f9f2558d6c29731d3a9bb86c32a31575 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -2261,7 +2261,7 @@ extern inline struct _TEB * WINAPI NtCurrentTeb(void) return teb; } #elif defined(__x86_64__) && defined(__GNUC__) -extern inline struct _TEB * WINAPI NtCurrentTeb(void) +static inline struct _TEB * WINAPI NtCurrentTeb(void) { struct _TEB *teb; __asm__(".byte 0x65\n\tmovq (0x30),%0" : "=r" (teb));