Add checks for explicit_bzero(), explicit_memset()

This commit is contained in:
Francois Kritzinger 2022-01-17 11:30:15 +02:00
parent 2b7f360cdd
commit d72596f486
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,12 @@
// HAVE_EXPLICIT_BZERO
#undef HAVE_EXPLICIT_BZERO
/* Since FreeBSD 11, OpenBSD 5.5, and glibc 2.25.
*/
#if (defined(__FreeBSD__) && __FreeBSD__ >= 11) || \
(defined(__OpenBSD__) && defined(OpenBSD) && OpenBSD >= 201405) || \
(defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
(__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 25))
# define HAVE_EXPLICIT_BZERO 1
#endif

View File

@ -0,0 +1,9 @@
// HAVE_EXPLICIT_MEMSET
#undef HAVE_EXPLICIT_MEMSET
/* Since NetBSD 7.0.0.
*/
#if defined(__NetBSD_Version__) && __NetBSD_Version__ >= 700000000
# define HAVE_EXPLICIT_MEMSET 1
#endif