about summary refs log tree commit diff
path: root/include/afl-fuzz.h
diff options
context:
space:
mode:
authorhexcoder <hexcoder-@users.noreply.github.com>2019-10-26 10:45:20 +0200
committerGitHub <noreply@github.com>2019-10-26 10:45:20 +0200
commit17729ce856058845314d1a3cb08e7a28d943db29 (patch)
tree372c3292fb52180e4395cae9cbb9f90180093e3c /include/afl-fuzz.h
parenta1f7de2bc36d23c758bee88a9ce0a90f5d8f2057 (diff)
parentcfd7b906cbc961892646aee9f307f6ffd4eb2253 (diff)
downloadafl++-17729ce856058845314d1a3cb08e7a28d943db29.tar.gz
Merge pull request #89 from devnexen/dfbsd_porting
Porting cpu affinity to DragonFly.
Diffstat (limited to 'include/afl-fuzz.h')
-rw-r--r--include/afl-fuzz.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/afl-fuzz.h b/include/afl-fuzz.h
index 1e6140dd..637c2795 100644
--- a/include/afl-fuzz.h
+++ b/include/afl-fuzz.h
@@ -72,18 +72,21 @@
 #include <sys/file.h>
 
 #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
-    defined(__NetBSD__)
+    defined(__NetBSD__) || defined(__DragonFly__)
 #include <sys/sysctl.h>
 #endif                           /* __APPLE__ || __FreeBSD__ || __OpenBSD__ */
 
 /* For systems that have sched_setaffinity; right now just Linux, but one
    can hope... */
 
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
+    defined(__DragonFly__)
 #define HAVE_AFFINITY 1
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__DragonFly__)
 #include <sys/param.h>
+#if defined(__FreeBSD__)
 #include <sys/cpuset.h>
+#endif
 #include <sys/user.h>
 #include <pthread.h>
 #include <pthread_np.h>