about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2020-02-08 18:14:32 +0100
committerGitHub <noreply@github.com>2020-02-08 18:14:32 +0100
commit4e8941950cd75fd2efe60abb3f5754ac6672882b (patch)
treec1ee264c45276b30777ea0a8bf94e4983d0760b0
parent312732bdbe50e67ad900ae5e4fe7696c7b3f753c (diff)
parent4dbb47feb13bd56daeeaee4e567999eae8e8e463 (diff)
downloadafl++-4e8941950cd75fd2efe60abb3f5754ac6672882b.tar.gz
Merge pull request #192 from devnexen/libdislocator_fbsd_build_fix
libdislocator FreeBSD build fix. max_align_t had been define from the…
-rw-r--r--libdislocator/libdislocator.so.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libdislocator/libdislocator.so.c b/libdislocator/libdislocator.so.c
index 98f16358..bb767495 100644
--- a/libdislocator/libdislocator.so.c
+++ b/libdislocator/libdislocator.so.c
@@ -33,6 +33,10 @@
 #include <mach/vm_statistics.h>
 #endif
 
+#ifdef __FreeBSD__
+#include <sys/param.h>
+#endif
+
 #ifdef __linux__
 #include <unistd.h>
 #include <sys/syscall.h>
@@ -64,7 +68,7 @@
 #include "config.h"
 #include "types.h"
 
-#if __STDC_VERSION__ < 201112L || defined __FreeBSD__
+#if __STDC_VERSION__ < 201112L || (defined(__FreeBSD__) && __FreeBSD_version < 1200000)
 // use this hack if not C11
 typedef struct {