about summary refs log tree commit diff
path: root/libdislocator/libdislocator.so.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-06-29 18:36:06 +0200
committerGitHub <noreply@github.com>2020-06-29 18:36:06 +0200
commitfc5cfc6cb309b072a45b991be117c17396e46a89 (patch)
tree4c762f1e2cfb4a8741c08b5b60d07c2ae8eee860 /libdislocator/libdislocator.so.c
parent76a2d9b59b23873c8a6d174a2f3c48eba60712fb (diff)
parent6d9b29daca46c8912aa9ddf6c053bc8554e9e9f7 (diff)
downloadafl++-fc5cfc6cb309b072a45b991be117c17396e46a89.tar.gz
Merge pull request #428 from AFLplusplus/dev
Dev
Diffstat (limited to 'libdislocator/libdislocator.so.c')
-rw-r--r--libdislocator/libdislocator.so.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libdislocator/libdislocator.so.c b/libdislocator/libdislocator.so.c
index 6b1cc848..7a70fd15 100644
--- a/libdislocator/libdislocator.so.c
+++ b/libdislocator/libdislocator.so.c
@@ -37,9 +37,12 @@
   #include <sys/param.h>
 #endif
 
-#if defined(__linux__) && !defined(__ANDROID__)
+#if (defined(__linux__) && !defined(__ANDROID__)) || defined(__HAIKU__)
   #include <unistd.h>
-  #include <sys/syscall.h>
+  #ifdef __linux__
+    #include <sys/syscall.h>
+    #include <malloc.h>
+  #endif
   #ifdef __NR_getrandom
     #define arc4random_buf(p, l)                       \
       do {                                             \