include: Fix the use of __getReg for aarch64/msvc mode.

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>
This commit is contained in:
Martin Storsjö 2023-05-31 10:07:50 +03:00 committed by Alexandre Julliard
parent 7ed63c30e8
commit 0fac6bcfa4

View file

@ -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)
{