https://bugs.winehq.org/show_bug.cgi?id=48620
--- Comment #10 from Leonid Yuriev leo@yuriev.ru --- (In reply to Zebediah Figura from comment #9)
It won't work, no, because the generated stub is different for each function (it has to include the function name itself).
Better to try to fix Wine than to work around its insufficiencies in the program, anyway.
Many thanks.
Today I committed the workaround into libmdbx. For now it is quite simply, since I need solution for all Wine versions, not a new/future ones. https://github.com/erthink/libmdbx/commit/f76be142d542f9e1ae712cee503eaa517a...
Unfortunately, there is another problem that was not noticed initially. For data durability and integrity libmdbx should prevents read/write sharing a DB over network (e.g. on a network shares), since the underlying file is memory-mapped.
To do this, libmdbx performs several checks via Windows API. However it is very problematic to implement the corresponding functionality in Wine (need to determine the file system type using non-portable methods, and then somehow translate this information to the Windows API terms. Seems it would be madness).
So, for now I just added Wine detection and conditionally disabling of some features.
Regards.