Using explicit_memset for the explicit_bzero compatibility layer.

Favoriting the native implementation in this case.
This commit is contained in:
David Carlier 2020-11-21 12:22:23 +00:00 committed by Darren Tucker
parent 2e0beff67d
commit 1cb6ce98d6
2 changed files with 10 additions and 1 deletions

View File

@ -1805,6 +1805,7 @@ AC_CHECK_FUNCS([ \
err \
errx \
explicit_bzero \
explicit_memset \
fchmod \
fchmodat \
fchown \

View File

@ -15,7 +15,15 @@
#ifndef HAVE_EXPLICIT_BZERO
#ifdef HAVE_MEMSET_S
#ifdef HAVE_EXPLICIT_MEMSET
void
explicit_bzero(void *p, size_t n)
{
(void)explicit_memset(p, 0, n);
}
#elif defined(HAVE_MEMSET_S)
void
explicit_bzero(void *p, size_t n)