[commit: ghc] ghc-8.2: Fix build on DragonflyBSD (3d468a9)

git at git.haskell.org git at git.haskell.org
Sat Apr 22 02:29:16 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/3d468a99cb9e5aaea8bce576bc0a64b7acc7e5be/ghc

>---------------------------------------------------------------

commit 3d468a99cb9e5aaea8bce576bc0a64b7acc7e5be
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Fri Apr 21 12:11:41 2017 -0400

    Fix build on DragonflyBSD
    
    Test Plan: Validate on DragonflyBSD
    
    Reviewers: austin, erikd, simonmar
    
    Reviewed By: erikd
    
    Subscribers: rwbarton, thomie
    
    Differential Revision: https://phabricator.haskell.org/D3480
    
    (cherry picked from commit cfff183f9ebcbe8ec4df9dcf39e95ac077d6e312)


>---------------------------------------------------------------

3d468a99cb9e5aaea8bce576bc0a64b7acc7e5be
 rts/linker/Elf.c      | 3 +++
 rts/posix/OSThreads.c | 6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/rts/linker/Elf.c b/rts/linker/Elf.c
index 086a323..df35604 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 45f3942..c9adf4e 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)



More information about the ghc-commits mailing list