1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 10:05:05 -07:00

mshield requires memory protection

This commit is contained in:
Frank Denis 2019-06-22 17:02:34 +02:00
parent bfeca0eb73
commit 495fdb3693

View File

@ -725,6 +725,15 @@ sodium_mprotect_readwrite(void *ptr)
return _sodium_mprotect(ptr, _mprotect_readwrite);
}
#ifndef HAVE_PAGE_PROTECTION
int
sodium_mshield(void *ptr)
{
(void) ptr;
errno = ENOSYS;
return -1;
}
#else
int
sodium_mshield(void *ptr)
{
@ -750,6 +759,7 @@ sodium_mshield(void *ptr)
return 0;
}
#endif
int
sodium_munshield(void *ptr)