about summary refs log tree commit diff
path: root/libdislocator/libdislocator.so.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdislocator/libdislocator.so.c')
-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))