projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix build failure on Windows
[ghc-hetmet.git]
/
rts
/
PosixSource.h
diff --git
a/rts/PosixSource.h
b/rts/PosixSource.h
index
cd1aeea
..
b3da60f
100644
(file)
--- a/
rts/PosixSource.h
+++ b/
rts/PosixSource.h
@@
-9,6
+9,8
@@
#ifndef POSIXSOURCE_H
#define POSIXSOURCE_H
#ifndef POSIXSOURCE_H
#define POSIXSOURCE_H
+#include <ghcplatform.h>
+
#define _POSIX_SOURCE 1
#define _POSIX_C_SOURCE 199506L
#define _XOPEN_SOURCE 500
#define _POSIX_SOURCE 1
#define _POSIX_C_SOURCE 199506L
#define _XOPEN_SOURCE 500
@@
-16,4
+18,12
@@
/* Let's be ISO C99 too... */
/* Let's be ISO C99 too... */
+#if defined(darwin_HOST_OS)
+/* If we don't define this the including sysctl breaks with things like
+ /usr/include/bsm/audit.h:224:0:
+ error: syntax error before 'u_char'
+*/
+#define _DARWIN_C_SOURCE 1
+#endif
+
#endif /* POSIXSOURCE_H */
#endif /* POSIXSOURCE_H */