diff --git a/patches/kernel32-EnumSystemFirmwareTables/0001-kernel32-Add-stub-implementation-of-EnumSystemFirmwa.patch b/patches/kernel32-EnumSystemFirmwareTables/0001-kernel32-Add-stub-implementation-of-EnumSystemFirmwa.patch new file mode 100644 index 00000000..352b4a97 --- /dev/null +++ b/patches/kernel32-EnumSystemFirmwareTables/0001-kernel32-Add-stub-implementation-of-EnumSystemFirmwa.patch @@ -0,0 +1,88 @@ +From 81e115ab673af02b03e8026ba644313e9d786aea Mon Sep 17 00:00:00 2001 +From: Steven Bell +Date: Tue, 30 Jul 2019 14:33:23 -0700 +Subject: [PATCH] kernel32: Add stub implementation of + EnumSystemFirmwareTables. + +A recent change to the game Everquest adds a call to EnumSystemFirmwareTables. +This of course causes the game to crash. Adding this stub call restores full +functionality to the game. + +Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47523 +Signed-off-by: Steven Bell +--- + .../api-ms-win-core-sysinfo-l1-2-0.spec | 2 +- + .../api-ms-win-core-sysinfo-l1-2-1.spec | 2 +- + dlls/kernel32/cpu.c | 10 ++++++++++ + dlls/kernel32/kernel32.spec | 2 +- + dlls/kernelbase/kernelbase.spec | 2 +- + 5 files changed, 14 insertions(+), 4 deletions(-) + +diff --git a/dlls/api-ms-win-core-sysinfo-l1-2-0/api-ms-win-core-sysinfo-l1-2-0.spec b/dlls/api-ms-win-core-sysinfo-l1-2-0/api-ms-win-core-sysinfo-l1-2-0.spec +index 9b0567412d..1103427d4d 100644 +--- a/dlls/api-ms-win-core-sysinfo-l1-2-0/api-ms-win-core-sysinfo-l1-2-0.spec ++++ b/dlls/api-ms-win-core-sysinfo-l1-2-0/api-ms-win-core-sysinfo-l1-2-0.spec +@@ -1,4 +1,4 @@ +-@ stub EnumSystemFirmwareTables ++@ stdcall EnumSystemFirmwareTables(long ptr long) kernel32.EnumSystemFirmwareTables + @ stdcall GetComputerNameExA(long ptr ptr) kernel32.GetComputerNameExA + @ stdcall GetComputerNameExW(long ptr ptr) kernel32.GetComputerNameExW + @ stdcall GetLocalTime(ptr) kernel32.GetLocalTime +diff --git a/dlls/api-ms-win-core-sysinfo-l1-2-1/api-ms-win-core-sysinfo-l1-2-1.spec b/dlls/api-ms-win-core-sysinfo-l1-2-1/api-ms-win-core-sysinfo-l1-2-1.spec +index 6da2f25fa1..9a89b4b57a 100644 +--- a/dlls/api-ms-win-core-sysinfo-l1-2-1/api-ms-win-core-sysinfo-l1-2-1.spec ++++ b/dlls/api-ms-win-core-sysinfo-l1-2-1/api-ms-win-core-sysinfo-l1-2-1.spec +@@ -1,5 +1,5 @@ + @ stub DnsHostnameToComputerNameExW +-@ stub EnumSystemFirmwareTables ++@ stdcall EnumSystemFirmwareTables(long ptr long) kernel32.EnumSystemFirmwareTables + @ stdcall GetComputerNameExA(long ptr ptr) kernel32.GetComputerNameExA + @ stdcall GetComputerNameExW(long ptr ptr) kernel32.GetComputerNameExW + @ stdcall GetLocalTime(ptr) kernel32.GetLocalTime +diff --git a/dlls/kernel32/cpu.c b/dlls/kernel32/cpu.c +index 7668a10ea4..2da36bdb54 100644 +--- a/dlls/kernel32/cpu.c ++++ b/dlls/kernel32/cpu.c +@@ -365,3 +365,13 @@ UINT WINAPI GetSystemFirmwareTable(DWORD provider, DWORD id, void *buffer, DWORD + HeapFree(GetProcessHeap(), 0, sfti); + return buffer_size; + } ++ ++ ++/*********************************************************************** ++ * EnumSystemFirmwareTables (KERNEL32.@) ++ */ ++UINT WINAPI EnumSystemFirmwareTables(DWORD provider, void *buffer, DWORD size) ++{ ++ FIXME("%d, %p, %d stub, always returning 0\n", provider, buffer, size); ++ return 0; ++} +diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec +index 016c3022dc..fb8e4c9642 100644 +--- a/dlls/kernel32/kernel32.spec ++++ b/dlls/kernel32/kernel32.spec +@@ -418,7 +418,7 @@ + @ stdcall EnumResourceTypesW(long ptr long) + @ stdcall EnumSystemCodePagesA(ptr long) + @ stdcall EnumSystemCodePagesW(ptr long) +-# @ stub EnumSystemFirmwareTables ++@ stdcall EnumSystemFirmwareTables(long ptr long) + @ stdcall EnumSystemGeoID(long long ptr) + @ stdcall EnumSystemLanguageGroupsA(ptr long ptr) + @ stdcall EnumSystemLanguageGroupsW(ptr long ptr) +diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec +index 4bb2b55cde..91e78889e6 100644 +--- a/dlls/kernelbase/kernelbase.spec ++++ b/dlls/kernelbase/kernelbase.spec +@@ -312,7 +312,7 @@ + @ stdcall EnumResourceTypesExA(long ptr long long long) + @ stdcall EnumResourceTypesExW(long ptr long long long) + @ stdcall EnumSystemCodePagesW(ptr long) kernel32.EnumSystemCodePagesW +-# @ stub EnumSystemFirmwareTables ++@ stdcall EnumSystemFirmwareTables(long ptr long) kernel32.EnumSystemFirmwareTables + @ stdcall EnumSystemGeoID(long long ptr) kernel32.EnumSystemGeoID + @ stdcall EnumSystemLanguageGroupsW(ptr long ptr) kernel32.EnumSystemLanguageGroupsW + @ stdcall EnumSystemLocalesA(ptr long) kernel32.EnumSystemLocalesA +-- +2.17.1 + diff --git a/patches/kernel32-EnumSystemFirmwareTables/definition b/patches/kernel32-EnumSystemFirmwareTables/definition new file mode 100644 index 00000000..8b0cc923 --- /dev/null +++ b/patches/kernel32-EnumSystemFirmwareTables/definition @@ -0,0 +1 @@ +Fixes: [47523] kernel32: Add stub implementation of EnumSystemFirmwareTables. diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 993786af..b8893901 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -159,6 +159,7 @@ patch_enable_all () enable_iphlpapi_System_Ping="$1" enable_kernel32_CopyFileEx="$1" enable_kernel32_Debugger="$1" + enable_kernel32_EnumSystemFirmwareTables="$1" enable_kernel32_FindFirstFile="$1" enable_kernel32_Job_Tests="$1" enable_kernel32_K32GetPerformanceInfo="$1" @@ -609,6 +610,9 @@ patch_enable () kernel32-Debugger) enable_kernel32_Debugger="$2" ;; + kernel32-EnumSystemFirmwareTables) + enable_kernel32_EnumSystemFirmwareTables="$2" + ;; kernel32-FindFirstFile) enable_kernel32_FindFirstFile="$2" ;; @@ -4298,6 +4302,22 @@ if test "$enable_kernel32_Debugger" -eq 1; then ) >> "$patchlist" fi +# Patchset kernel32-EnumSystemFirmwareTables +# | +# | This patchset fixes the following Wine bugs: +# | * [#47523] kernel32: Add stub implementation of EnumSystemFirmwareTables. +# | +# | Modified files: +# | * dlls/api-ms-win-core-sysinfo-l1-2-0/api-ms-win-core-sysinfo-l1-2-0.spec, dlls/api-ms-win-core-sysinfo-l1-2-1/api-ms-win- +# | core-sysinfo-l1-2-1.spec, dlls/kernel32/cpu.c, dlls/kernel32/kernel32.spec, dlls/kernelbase/kernelbase.spec +# | +if test "$enable_kernel32_EnumSystemFirmwareTables" -eq 1; then + patch_apply kernel32-EnumSystemFirmwareTables/0001-kernel32-Add-stub-implementation-of-EnumSystemFirmwa.patch + ( + printf '%s\n' '+ { "Steven Bell", "kernel32: Add stub implementation of EnumSystemFirmwareTables.", 1 },'; + ) >> "$patchlist" +fi + # Patchset kernel32-FindFirstFile # | # | This patchset fixes the following Wine bugs: