about summary refs log tree commit diff
path: root/libdislocator
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-06-29 18:19:35 +0200
committerGitHub <noreply@github.com>2020-06-29 18:19:35 +0200
commit8f1b78f49e8efef8ec089230d732cdee7b37fa9a (patch)
tree4cb5e6e59f24f488e58fbb1aced2dbc0e6550c15 /libdislocator
parent12bdefe00e38cdc3dd8cb028eeac325ab2e94e16 (diff)
parent3a0c91b86205bfebb8ec7e62a2e7b0bfcec2e407 (diff)
downloadafl++-8f1b78f49e8efef8ec089230d732cdee7b37fa9a.tar.gz
Merge pull request #426 from AFLplusplus/dev
Dev
Diffstat (limited to 'libdislocator')
-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 {                                             \