summaryrefslogtreecommitdiff
path: root/rts/linker/LoadArchive.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/LoadArchive.c
parent7a7bb5d27b0e240304bd18e7ebd2f60877e4cc12 (diff)
downloadhaskell-ec0bf8117d1aefd20711a6152ebbca63f3bd0774.tar.gz
rts: Fix LoadArchive on OS X
Diffstat (limited to 'rts/linker/LoadArchive.c')
-rw-r--r--rts/linker/LoadArchive.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/rts/linker/LoadArchive.c b/rts/linker/LoadArchive.c
index 6e1fb29628..a5af719cfd 100644
--- a/rts/linker/LoadArchive.c
+++ b/rts/linker/LoadArchive.c
@@ -9,8 +9,15 @@
#include "PathUtils.h"
#include "LinkerInternals.h"
#include "linker/M32Alloc.h"
+
+/* Platform specific headers */
#if defined(OBJFORMAT_PEi386)
-#include "linkers/PEi386.h"
+# include "linkers/PEi386.h"
+#elif defined(darwin_HOST_OS)
+# include "linker/MachO.h"
+# include <regex.h>
+# include <mach/machine.h>
+# include <mach-o/fat.h>
#endif
#include <ctype.h>