DragonFlyBSD build fix proposal.
MODIFY
GNUmakefile.gcc_plugin
GNUmakefile.gcc_plugin
@@ -56,7 +56,8 @@ ifeq "$(findstring Foundation,$(shell $(CC) --version))" ""
CXX = g++
endif
-PLUGIN_FLAGS = -fPIC -fno-rtti -I"$(shell $(CC) -print-file-name=plugin)/include"
+PLUGIN_BASE = "$(shell $(CC) -print-file-name=plugin)"
+PLUGIN_FLAGS = -fPIC -fno-rtti -I$(PLUGIN_BASE)/include -I$(PLUGIN_BASE)
HASH=\#
GCCVER = $(shell $(CC) --version 2>/dev/null | awk 'NR == 1 {print $$NF}')
@@ -88,6 +89,10 @@ ifeq "$(shell uname -s)" "OpenBSD"
PLUGIN_FLAGS += -I/usr/local/include
endif
+ifeq "$(shell uname -s)" "DragonFly"
+ PLUGIN_FLAGS += -I/usr/local/include
+endif
+
ifeq "$(shell uname -s)" "SunOS"
PLUGIN_FLAGS += -I/usr/include/gmp
endif

MODIFY
include/afl-fuzz.h
include/afl-fuzz.h
#include <sched.h>
#include <netdb.h>
+#include <netinet/in.h>
#include <sys/wait.h>
#include <sys/time.h>

MODIFY
src/afl-fuzz-init.c
src/afl-fuzz-init.c
@@ -272,7 +272,7 @@ void bind_to_free_cpu(afl_state_t *afl) {
#elif defined(__DragonFly__)
- if (procs[i].kp_lwp.kl_cpuid < sizeof(cpu_used) &&
+ if (procs[i].kp_lwp.kl_cpuid < (s32)sizeof(cpu_used) &&
procs[i].kp_lwp.kl_pctcpu > 10)
cpu_used[procs[i].kp_lwp.kl_cpuid] = 1;

DragonFlyBSD build fix proposal.