diff options
-rw-r--r-- | SConstruct | 1 | ||||
-rw-r--r-- | src/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/meson.build | 1 | ||||
-rw-r--r-- | src/safe_memclear.c | 2 |
4 files changed, 4 insertions, 1 deletions
@@ -388,6 +388,7 @@ if 1: 'dup2', 'epoll_ctl', 'explicit_bzero', + 'explicit_memset', 'fork', 'getcwd', 'gethostbyname', diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7a38aa0b..0ea09a64 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -185,6 +185,7 @@ check_function_exists(issetugid HAVE_ISSETUGID) check_function_exists(inet_pton HAVE_INET_PTON) check_function_exists(memset_s HAVE_MEMSET_S) check_function_exists(explicit_bzero HAVE_EXPLICIT_BZERO) +check_function_exists(explicit_memset HAVE_EXPLICIT_MEMSET) check_symbol_exists(clock_gettime "time.h" HAVE_CLOCK_GETTIME) if (NOT HAVE_CLOCK_GETTIME) check_library_exists(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME) diff --git a/src/meson.build b/src/meson.build index 5c0fc607..4bc92ad5 100644 --- a/src/meson.build +++ b/src/meson.build @@ -151,6 +151,7 @@ conf_data.set('HAVE_ISSETUGID', compiler.has_function('issetugid', args: defs)) conf_data.set('HAVE_INET_PTON', compiler.has_function('inet_pton', args: defs)) conf_data.set('HAVE_MEMSET_S', compiler.has_function('memset_s', args: defs)) conf_data.set('HAVE_EXPLICIT_BZERO', compiler.has_function('explicit_bzero', args: defs)) +conf_data.set('HAVE_EXPLICIT_MEMSET', compiler.has_function('explicit_memset', args: defs)) conf_data.set('HAVE_CLOCK_GETTIME', compiler.has_header_symbol('time.h', 'clock_gettime')) clock_lib = [] diff --git a/src/safe_memclear.c b/src/safe_memclear.c index 46e3f179..15617a46 100644 --- a/src/safe_memclear.c +++ b/src/safe_memclear.c @@ -42,7 +42,7 @@ void safe_memclear(void *s, size_t n) { #elif defined(HAVE_EXPLICIT_BZERO) explicit_bzero(s, n); #elif defined(HAVE_EXPLICIT_MEMSET) - explicit_memset(s, 0, n); + explicit_memset(s, 0, n); #else safe_memset(s, 0, n); #endif |