summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rts/linker/Elf.c3
-rw-r--r--rts/posix/OSThreads.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/rts/linker/Elf.c b/rts/linker/Elf.c
index 36941b2a93..e41c066644 100644
--- a/rts/linker/Elf.c
+++ b/rts/linker/Elf.c
@@ -26,6 +26,9 @@
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
+#if defined(dragonfly_HOST_OS)
+#include <sys/tls.h>
+#endif
/* on x86_64 we have a problem with relocating symbol references in
* code that was compiled without -fPIC. By default, the small memory
diff --git a/rts/posix/OSThreads.c b/rts/posix/OSThreads.c
index 45f394208f..c9adf4e6eb 100644
--- a/rts/posix/OSThreads.c
+++ b/rts/posix/OSThreads.c
@@ -9,9 +9,9 @@
#include "PosixSource.h"
-#if defined(freebsd_HOST_OS)
-/* Inclusion of system headers usually requires __BSD_VISIBLE on FreeBSD,
- * because of some specific types, like u_char, u_int, etc. */
+#if defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS)
+/* Inclusion of system headers usually requires __BSD_VISIBLE on FreeBSD and
+ * DragonflyBSD, because of some specific types, like u_char, u_int, etc. */
#define __BSD_VISIBLE 1
#endif
#if defined(darwin_HOST_OS)