From 495fdb36936208b55699d083e3ef735313eaba7f Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 22 Jun 2019 17:02:34 +0200 Subject: [PATCH] mshield requires memory protection --- src/libsodium/sodium/utils.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/libsodium/sodium/utils.c b/src/libsodium/sodium/utils.c index e1f04a90..3124ed64 100644 --- a/src/libsodium/sodium/utils.c +++ b/src/libsodium/sodium/utils.c @@ -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)