summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-07-23 05:11:59 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-08-09 15:11:58 -0400
commitfc350dba63da7eefbaa2793fe9fe99f8571b75c0 (patch)
treea607a0c9ddc2d051cc282d29a9285fbb8aa347e3 /utils
parentdb7098fe7aa3f7324d146821334b774032ea87bd (diff)
downloadhaskell-fc350dba63da7eefbaa2793fe9fe99f8571b75c0.tar.gz
Make `PosixSource.h` installed and under `rts/`
is used outside of the rts so we do this rather than just fish it out of the repo in ad-hoc way, in order to make packages in this repo more self-contained.
Diffstat (limited to 'utils')
-rw-r--r--utils/iserv/cbits/iservmain.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/utils/iserv/cbits/iservmain.c b/utils/iserv/cbits/iservmain.c
index daefd35251..d88d14e0d6 100644
--- a/utils/iserv/cbits/iservmain.c
+++ b/utils/iserv/cbits/iservmain.c
@@ -1,7 +1,18 @@
-#include "../rts/PosixSource.h"
-#include "Rts.h"
+#if GHC_STAGE > 1
+# include <rts/PosixSource.h>
+#else // PosixSource.h not yet exposed, hacky inline for now.
+# include <ghcplatform.h>
+# if defined(solaris2_HOST_OS)
+# define _POSIX_C_SOURCE 200112L
+# define _XOPEN_SOURCE 600
+# else
+# define _POSIX_C_SOURCE 200809L
+# define _XOPEN_SOURCE 700
+# endif
+#endif
+#include <Rts.h>
-#include "HsFFI.h"
+#include <HsFFI.h>
int main (int argc, char *argv[])
{