mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-30 01:54:13 +08:00
mdbx-windows: fix for non-x86 with MDBX_WITHOUT_MSVC_CRT=ON
and MDBX_BUILD_SHARED_LIBRARY=ON
.
This commit is contained in:
parent
03e7e3be74
commit
f341129afa
@ -1945,6 +1945,9 @@ __cold MDBX_INTERNAL_FUNC void mdbx_osal_jitter(bool tiny) {
|
||||
#if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || \
|
||||
defined(__x86_64__)
|
||||
const unsigned salt = 277u * (unsigned)__rdtsc();
|
||||
#elif (defined(_WIN32) || defined(_WIN64)) && MDBX_WITHOUT_MSVC_CRT
|
||||
static ULONG state;
|
||||
const unsigned salt = (unsigned)RtlRandomEx(&state);
|
||||
#else
|
||||
const unsigned salt = rand();
|
||||
#endif
|
||||
|
@ -991,6 +991,8 @@ typedef LSTATUS(WINAPI *MDBX_RegGetValueA)(HKEY hkey, LPCSTR lpSubKey,
|
||||
LPDWORD pcbData);
|
||||
MDBX_INTERNAL_VAR MDBX_RegGetValueA mdbx_RegGetValueA;
|
||||
|
||||
NTSYSAPI ULONG RtlRandomEx(PULONG Seed);
|
||||
|
||||
#endif /* Windows */
|
||||
|
||||
#endif /* !__cplusplus */
|
||||
|
Loading…
x
Reference in New Issue
Block a user