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 \ err \
errx \ errx \
explicit_bzero \ explicit_bzero \
explicit_memset \
fchmod \ fchmod \
fchmodat \ fchmodat \
fchown \ fchown \

View File

@ -15,7 +15,15 @@
#ifndef HAVE_EXPLICIT_BZERO #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 void
explicit_bzero(void *p, size_t n) explicit_bzero(void *p, size_t n)