Module: wine Branch: master Commit: c8ecc35966f7a640050d12ccf7676a40cd1ae9d0 URL: https://gitlab.winehq.org/wine/wine/-/commit/c8ecc35966f7a640050d12ccf7676a4...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Nov 17 09:57:14 2023 +0100
win32u: Build the syscall argument array from the generated syscall list.
---
dlls/ntdll/unix/loader.c | 1 - dlls/win32u/syscall.c | 11 ++++++++++- 2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index c5ffbf1eb0a..fa38cea0615 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -945,7 +945,6 @@ NTSTATUS ntdll_init_syscalls( SYSTEM_SERVICE_TABLE *table, void **dispatcher ) NtTerminateProcess( GetCurrentProcess(), STATUS_INVALID_PARAMETER ); } info->dispatcher = __wine_syscall_dispatcher; - memcpy( table->ArgumentTable, (USHORT *)(info + 1) + info->limit, table->ServiceLimit ); KeServiceDescriptorTable[info->id] = *table; return STATUS_SUCCESS; } diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 64bba9fbf99..b741df91c66 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -47,7 +47,16 @@ static void * const syscalls[] = #undef SYSCALL_ENTRY };
-static BYTE arguments[ARRAY_SIZE(syscalls)]; +static BYTE arguments[ARRAY_SIZE(syscalls)] = +{ +#define SYSCALL_ENTRY(id,name,args) args, +#ifdef _WIN64 + ALL_SYSCALLS64 +#else + ALL_SYSCALLS32 +#endif +#undef SYSCALL_ENTRY +};
static SYSTEM_SERVICE_TABLE syscall_table = {