aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2019-09-05 11:23:10 +0200
committervan Hauser <vh@thc.org>2019-09-05 11:23:10 +0200
commitefa205289662db40382f9c2a4e83420438419bba (patch)
tree752b9cbeb144d5c888cb7fdad51b0a2e954bd0ae /include
parent52cbd650b7ae30c64152601fbc34350d61b3e02a (diff)
downloadAFLplusplus-efa205289662db40382f9c2a4e83420438419bba.tar.gz
fix BSD patch
Diffstat (limited to 'include')
-rw-r--r--include/afl-fuzz.h1
-rw-r--r--include/config.h7
2 files changed, 7 insertions, 1 deletions
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 <sys/sysctl.h>
-#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 */