From 670316f997826f4846b6c596903ea330c7a3a5d5 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Thu, 3 Oct 2019 20:27:00 +0100 Subject: Binding to the first free cpu, porting to FreeBSD --- include/afl-fuzz.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/afl-fuzz.h') diff --git a/include/afl-fuzz.h b/include/afl-fuzz.h index 4912b3f0..ff26c894 100644 --- a/include/afl-fuzz.h +++ b/include/afl-fuzz.h @@ -78,8 +78,15 @@ /* For systems that have sched_setaffinity; right now just Linux, but one can hope... */ -#ifdef __linux__ +#if defined (__linux__) || defined(__FreeBSD__) #define HAVE_AFFINITY 1 +#if defined(__FreeBSD__) +#include +#include +#include +#include +#define cpu_set_t cpuset_t +#endif #endif /* __linux__ */ #ifndef SIMPLE_FILES -- cgit 1.4.1