diff --git a/configure.ac b/configure.ac index 7c8f6322..0e550fed 100644 --- a/configure.ac +++ b/configure.ac @@ -908,7 +908,7 @@ AS_IF([test "x$WASI" = "x"],[ AC_CHECK_FUNCS([posix_memalign nanosleep]) AS_IF([test "x$WASI" = "x"],[ - AC_CHECK_FUNCS([memset_s explicit_bzero explicit_memset]) + AC_CHECK_FUNCS([memset_s explicit_bzero memset_explicit explicit_memset]) ]) AC_SUBST([LIBTOOL_EXTRA_FLAGS]) diff --git a/src/libsodium/sodium/utils.c b/src/libsodium/sodium/utils.c index 9b54fd64..64ecbfd2 100644 --- a/src/libsodium/sodium/utils.c +++ b/src/libsodium/sodium/utils.c @@ -132,6 +132,8 @@ sodium_memzero(void * const pnt, const size_t len) } #elif defined(HAVE_EXPLICIT_BZERO) explicit_bzero(pnt, len); +#elif defined(HAVE_MEMSET_EXPLICIT) + memset_explicit(pnt, 0, len); #elif defined(HAVE_EXPLICIT_MEMSET) explicit_memset(pnt, 0, len); #elif HAVE_WEAK_SYMBOLS