mirror of
https://gitlab.com/80486DX2-66/gists
synced 2024-11-14 20:35:54 +05:30
safe_mem.h: require OpenBSD v. >= 5.5, FreeBSD v. >= 11.0
This commit is contained in:
parent
8ca528509b
commit
dd1d4d5e37
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user