From efa205289662db40382f9c2a4e83420438419bba Mon Sep 17 00:00:00 2001 From: van Hauser Date: Thu, 5 Sep 2019 11:23:10 +0200 Subject: fix BSD patch --- include/afl-fuzz.h | 1 - include/config.h | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/afl-fuzz.h b/include/afl-fuzz.h index a04402ef..ff0b239c 100644 --- a/include/afl-fuzz.h +++ b/include/afl-fuzz.h @@ -73,7 +73,6 @@ #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) #include -#define HAVE_ARC4RANDOM 1 #endif /* __APPLE__ || __FreeBSD__ || __OpenBSD__ */ /* For systems that have sched_setaffinity; right now just Linux, but one diff --git a/include/config.h b/include/config.h index 1fd478c6..98eb0a38 100644 --- a/include/config.h +++ b/include/config.h @@ -371,5 +371,12 @@ // #define IGNORE_FINDS +/* for *BSD: use ARC4RANDOM and save a file descriptor */ +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) + #ifndef HAVE_ARC4RANDOM + #define HAVE_ARC4RANDOM 1 + #endif +#endif /* __APPLE__ || __FreeBSD__ || __OpenBSD__ */ + #endif /* ! _HAVE_CONFIG_H */ -- cgit 1.4.1