1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

NetBSD native support of explicit_bzero's like feature (#2145)

This commit is contained in:
David CARLIER 2019-08-17 06:17:30 +01:00 committed by Takashi Kokubun
parent ccbfb054b1
commit 28267cea08
2 changed files with 8 additions and 1 deletions

View file

@ -1761,6 +1761,7 @@ AC_CHECK_FUNCS(dup3)
AC_CHECK_FUNCS(eaccess) AC_CHECK_FUNCS(eaccess)
AC_CHECK_FUNCS(endgrent) AC_CHECK_FUNCS(endgrent)
AC_CHECK_FUNCS(eventfd) AC_CHECK_FUNCS(eventfd)
AC_CHECK_FUNCS(explicit_memset)
AC_CHECK_FUNCS(fcopyfile) AC_CHECK_FUNCS(fcopyfile)
AC_CHECK_FUNCS(fchmod) AC_CHECK_FUNCS(fchmod)
AC_CHECK_FUNCS(fchown) AC_CHECK_FUNCS(fchown)

View file

@ -33,7 +33,13 @@
#undef explicit_bzero #undef explicit_bzero
#ifndef HAVE_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 void
explicit_bzero(void *b, size_t len) explicit_bzero(void *b, size_t len)
{ {