aboutsummaryrefslogtreecommitdiff
path: root/libdislocator
diff options
context:
space:
mode:
authorDominik Maier <domenukk@gmail.com>2020-02-10 00:19:25 +0100
committerDominik Maier <domenukk@gmail.com>2020-02-10 00:19:25 +0100
commitbf1898736915d34906704f82202d1a8890a3cec4 (patch)
treeab450a0a67ea5c2ec14c5ac9536e4a379d16eb3d /libdislocator
parente19e06aba7e81a37f5f1a9974f061ab63bc86986 (diff)
parent33c18c36db70859fc484dd41a317634809d5c043 (diff)
downloadafl++-bf1898736915d34906704f82202d1a8890a3cec4.tar.gz
Merge branch 'master' of github.com:vanhauser-thc/AFLplusplus into unicorn
Diffstat (limited to 'libdislocator')
-rw-r--r--libdislocator/libdislocator.so.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/libdislocator/libdislocator.so.c b/libdislocator/libdislocator.so.c
index 21cd6f43..a0795c87 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,9 +68,16 @@
#include "config.h"
#include "types.h"
-#if __STDC_VERSION__ < 201112L
+#if __STDC_VERSION__ < 201112L || \
+ (defined(__FreeBSD__) && __FreeBSD_version < 1200000)
// use this hack if not C11
-typedef struct { long long __ll; long double __ld; } max_align_t;
+typedef struct {
+
+ long long __ll;
+ long double __ld;
+
+} max_align_t;
+
#endif
#define ALLOC_ALIGN_SIZE (_Alignof(max_align_t))