summaryrefslogtreecommitdiff
path: root/rts/Linker.c
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2016-11-11 10:58:08 -0500
committerBen Gamari <ben@smart-cactus.org>2016-11-11 11:10:47 -0500
commitec0bf8117d1aefd20711a6152ebbca63f3bd0774 (patch)
tree4bccdbdbb789e9a9b693faec34a2a91456ffcf43 /rts/Linker.c
parent7a7bb5d27b0e240304bd18e7ebd2f60877e4cc12 (diff)
downloadhaskell-ec0bf8117d1aefd20711a6152ebbca63f3bd0774.tar.gz
rts: Fix LoadArchive on OS X
Diffstat (limited to 'rts/Linker.c')
-rw-r--r--rts/Linker.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/rts/Linker.c b/rts/Linker.c
index ede5654e31..eba9821a3d 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -57,17 +57,14 @@
#include <dlfcn.h>
#endif
-#if defined(linux_HOST_OS) || defined(solaris2_HOST_OS) || defined(freebsd_HOST_OS) || defined(kfreebsdgnu_HOST_OS) || defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) || defined(openbsd_HOST_OS) || defined(gnu_HOST_OS)
-# define OBJFORMAT_ELF
+#if defined(OBJFORMAT_ELF)
# include "linker/Elf.h"
# include <regex.h> // regex is already used by dlopen() so this is OK
// to use here without requiring an additional lib
-#elif defined (mingw32_HOST_OS)
-# define OBJFORMAT_PEi386
+#elif defined(OBJFORMAT_PEi386)
# include "linker/PEi386.h"
# include <windows.h>
-#elif defined(darwin_HOST_OS)
-# define OBJFORMAT_MACHO
+#elif defined(OBJFORMAT_MACHO)
# include "linker/MachO.h"
# include <regex.h>
# include <mach/machine.h>