1
0
mirror of https://gitlab.com/80486DX2-66/gists synced 2024-11-14 02:15:53 +05:30

safe_mem.h: require OpenBSD v. >= 5.5, FreeBSD v. >= 11.0

This commit is contained in:
Intel A80486DX2-66 2024-03-26 23:12:37 +03:00
parent 8ca528509b
commit dd1d4d5e37
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -5,6 +5,9 @@
*
* Author: Intel A80486DX2-66
* License: Creative Commons Zero 1.0 Universal
*
* NOTE: Declare macro SAFE_MEM_OLD_BSD when compiling if you're using OpenBSD
* version earlier than 5.5 or FreeBSD version earlier than 11.0.
*/
#ifndef _SAFE_MEM_H
@ -29,7 +32,8 @@ typedef unsigned char byte;
malloc((size_t) (nmemb) * (size_t) (size))
/* secure_erase(dest, count): erases memory explicitly */
#if defined(__OpenBSD__) || defined(__FreeBSD__)
#if defined(__OpenBSD__) && !defined(SAFE_MEM_OLD_BSD) || \
defined(__FreeBSD__) && !defined(SAFE_MEM_OLD_BSD)
# define NO_SECURE_ERASE_WARRANTY 0
# define SECURE_ERASE_WARRANTY "OpenBSD/FreeBSD: explicit_bzero"