mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 12:33:44 +02:00
Windows fix.
This commit is contained in:
parent
b696ab12b8
commit
c17ac16728
1 changed files with 2 additions and 2 deletions
|
@ -103,7 +103,7 @@ extern const uint64_t s_mapNonce;
|
||||||
static ZT_INLINE void memoryLock(const void *const p, const unsigned int l) noexcept
|
static ZT_INLINE void memoryLock(const void *const p, const unsigned int l) noexcept
|
||||||
{
|
{
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
//VirtualLock(p, l);
|
VirtualLock(const_cast<LPVOID>(reinterpret_cast<LPVOID>(p)), l);
|
||||||
#else
|
#else
|
||||||
mlock(p, l);
|
mlock(p, l);
|
||||||
#endif
|
#endif
|
||||||
|
@ -118,7 +118,7 @@ static ZT_INLINE void memoryLock(const void *const p, const unsigned int l) noex
|
||||||
static ZT_INLINE void memoryUnlock(const void *const p, const unsigned int l) noexcept
|
static ZT_INLINE void memoryUnlock(const void *const p, const unsigned int l) noexcept
|
||||||
{
|
{
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
//VirtualUnlock(p, l);
|
VirtualUnlock(const_cast<LPVOID>(reinterpret_cast<LPVOID>(p)), l);
|
||||||
#else
|
#else
|
||||||
munlock(p, l);
|
munlock(p, l);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue