fix BSD patch
MODIFY
include/afl-fuzz.h
include/afl-fuzz.h
#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

MODIFY
include/config.h
include/config.h
// #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 */

MODIFY
src/afl-forkserver.c
src/afl-forkserver.c
#include <sys/wait.h>
#include <sys/resource.h>
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
-#define HAVE_ARC4RANDOM 1
-#endif /* __APPLE__ || __FreeBSD__ || __OpenBSD__ */
-
/* a program that includes afl-forkserver needs to define these */
extern u8 uses_asan;
extern u8 *trace_bits;
extern s32 forksrv_pid, child_pid, fsrv_ctl_fd, fsrv_st_fd;
extern s32 out_fd, out_dir_fd, dev_null_fd; /* initialize these with -1 */
#ifndef HAVE_ARC4RANDOM
-extern s32 dev_random_fd;
+extern s32 dev_urandom_fd;
#endif
extern u32 exec_tmout;
extern u64 mem_limit;

fix BSD patch