From: Martin Storsjö martin@martin.st
Clang requires the __getReg function to be declared in addition to be declared as an intrinsic with the pragma.
This fixes the following error:
../wine/include/winnt.h:2412:27: error: call to undeclared library function '__getReg' with type 'unsigned long long (int)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] return (struct _TEB *)__getReg(18); ^ ../wine/include/winnt.h:2412:27: note: include the header <intrin.h> or explicitly provide a declaration for '__getReg' 1 error generated.
Signed-off-by: Martin Storsjö martin@martin.st --- include/winnt.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/winnt.h b/include/winnt.h index 0117100a921..409dbceee59 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -2406,6 +2406,7 @@ static FORCEINLINE struct _TEB * WINAPI NtCurrentTeb(void) return __wine_current_teb; } #elif defined(__aarch64__) && defined(_MSC_VER) +unsigned __int64 __getReg(int); #pragma intrinsic(__getReg) static FORCEINLINE struct _TEB * WINAPI NtCurrentTeb(void) {