From fbf55e17cba1094c4a5898ee1a181a6762917f55 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Sat, 22 Feb 2020 20:00:25 +0300 Subject: [PATCH] mdbx-windows: one more workaround for Wine. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SetFileInformationByHandle() is not implemented by Wine. Change-Id: I61783c8d173397094cd6cbad7efc9d7aac57b470 002c:Call KERNEL32.SetFileInformationByHandle(00000060,00000006,0022f890,00000008) ret=127dd1b2 002c:fixme:file:SetFileInformationByHandle 0000000000000060, 6, 000000000022F890, 8 002c:Ret  KERNEL32.SetFileInformationByHandle() retval=00000000 ret=127dd1b2 Related to https://github.com/erthink/libmdbx/issues/83 --- src/elements/lck-windows.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/elements/lck-windows.c b/src/elements/lck-windows.c index 6a2142ea..264937d9 100644 --- a/src/elements/lck-windows.c +++ b/src/elements/lck-windows.c @@ -753,11 +753,11 @@ static void mdbx_winnt_import(void) { const HINSTANCE hKernel32dll = GetModuleHandleA("kernel32.dll"); GET_PROC_ADDR(hKernel32dll, GetFileInformationByHandleEx); - GET_PROC_ADDR(hKernel32dll, SetFileInformationByHandle); GET_PROC_ADDR(hKernel32dll, GetTickCount64); if (!mdbx_GetTickCount64) mdbx_GetTickCount64 = stub_GetTickCount64; if (!mdbx_RunningUnderWine()) { + GET_PROC_ADDR(hKernel32dll, SetFileInformationByHandle); GET_PROC_ADDR(hKernel32dll, GetVolumeInformationByHandleW); GET_PROC_ADDR(hKernel32dll, GetFinalPathNameByHandleW); GET_PROC_ADDR(hKernel32dll, PrefetchVirtualMemory);