Commit b1b5105ceb moved the following block
#ifdef AT_HWCAP2 if (getauxval( AT_HWCAP2 ) & 2) syscall_flags |= SYSCALL_HAVE_WRFSGSBASE; #endif
out of an #ifdef __linux__ block and it now causes failures on FreeBSD and others which do not have getauxval. Guard this invocation properly.
From: Gerald Pfeifer gerald@pfeifer.com
Commit b1b5105ceb moved the following block
#ifdef AT_HWCAP2 if (getauxval( AT_HWCAP2 ) & 2) syscall_flags |= SYSCALL_HAVE_WRFSGSBASE; #endif
out of an #ifdef __linux__ block and it now causes failures on FreeBSD and others which do not have getauxval. Guard this invocation properly. --- dlls/ntdll/unix/signal_x86_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index fb5259d8714..4d397ac01db 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -2504,7 +2504,7 @@ void signal_init_process(void)
if (cpu_info.ProcessorFeatureBits & CPU_FEATURE_XSAVE) syscall_flags |= SYSCALL_HAVE_XSAVE; if (xstate_compaction_enabled) syscall_flags |= SYSCALL_HAVE_XSAVEC; -#ifdef AT_HWCAP2 +#if defined(HAVE_GETAUXVAL) && defined(AT_HWCAP2) if (getauxval( AT_HWCAP2 ) & 2) syscall_flags |= SYSCALL_HAVE_WRFSGSBASE; #endif