diff --git a/configure.ac b/configure.ac index 6142716785..ff785b9398 100644 --- a/configure.ac +++ b/configure.ac @@ -1761,6 +1761,7 @@ AC_CHECK_FUNCS(dup3) AC_CHECK_FUNCS(eaccess) AC_CHECK_FUNCS(endgrent) AC_CHECK_FUNCS(eventfd) +AC_CHECK_FUNCS(explicit_memset) AC_CHECK_FUNCS(fcopyfile) AC_CHECK_FUNCS(fchmod) AC_CHECK_FUNCS(fchown) diff --git a/missing/explicit_bzero.c b/missing/explicit_bzero.c index a7ff9cb517..1804cdd42e 100644 --- a/missing/explicit_bzero.c +++ b/missing/explicit_bzero.c @@ -33,7 +33,13 @@ #undef explicit_bzero #ifndef HAVE_EXPLICIT_BZERO - #ifdef HAVE_MEMSET_S + #ifdef HAVE_EXPLICIT_MEMSET +void +explicit_bzero(void *b, size_t len) +{ + (void)explicit_memset(b, 0, len); +} + #elif defined HAVE_MEMSET_S void explicit_bzero(void *b, size_t len) {