diff options
author | Jack Lloyd <[email protected]> | 2018-02-13 06:05:20 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-02-13 06:05:20 -0500 |
commit | f8744562284897c18d2c02102191a77de1a2afa0 (patch) | |
tree | 048110b9045ddc9d38180f62809fd9d5152bd24d /src/lib/utils/os_utils.cpp | |
parent | ffc60894c2b4cb733050f008a8f229bb94de5745 (diff) |
Enable VirtualLock on MinGW builds
For some reason one of the blocks was guarded to be MSVC only,
but it works fine on MinGW also.
Diffstat (limited to 'src/lib/utils/os_utils.cpp')
-rw-r--r-- | src/lib/utils/os_utils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/utils/os_utils.cpp b/src/lib/utils/os_utils.cpp index 0f3ab7a32..57439e8ca 100644 --- a/src/lib/utils/os_utils.cpp +++ b/src/lib/utils/os_utils.cpp @@ -245,7 +245,7 @@ size_t OS::get_memory_locking_limit() return 0; #endif -#elif defined(BOTAN_TARGET_OS_HAS_VIRTUAL_LOCK) && defined(BOTAN_BUILD_COMPILER_IS_MSVC) +#elif defined(BOTAN_TARGET_OS_HAS_VIRTUAL_LOCK) SIZE_T working_min = 0, working_max = 0; DWORD working_flags = 0; if(!::GetProcessWorkingSetSizeEx(::GetCurrentProcess(), &working_min, &working_max, &working_flags)) @@ -317,7 +317,7 @@ void* OS::allocate_locked_pages(size_t length) ::memset(ptr, 0, length); return ptr; -#elif defined BOTAN_TARGET_OS_HAS_VIRTUAL_LOCK +#elif defined(BOTAN_TARGET_OS_HAS_VIRTUAL_LOCK) LPVOID ptr = ::VirtualAlloc(nullptr, length, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); if(!ptr) { |