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:
parent
ccbfb054b1
commit
28267cea08
2 changed files with 8 additions and 1 deletions
|
@ -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)
|
||||||
|
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue