diff options
author | Ian Lynagh <igloo@earth.li> | 2009-08-07 15:21:51 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2009-08-07 15:21:51 +0000 |
commit | b3bd828c358cbd79887dbd873357e265d8d6060a (patch) | |
tree | f8d27801cd027b324ce7946f5b9473d4f6d5007a /rts/PosixSource.h | |
parent | e0f750296ef29dc073f80d4e60e48c1db4a15a35 (diff) | |
download | haskell-b3bd828c358cbd79887dbd873357e265d8d6060a.tar.gz |
Fix the build on OS X
Diffstat (limited to 'rts/PosixSource.h')
-rw-r--r-- | rts/PosixSource.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rts/PosixSource.h b/rts/PosixSource.h index cd1aeea34c..b3da60fe37 100644 --- a/rts/PosixSource.h +++ b/rts/PosixSource.h @@ -9,6 +9,8 @@ #ifndef POSIXSOURCE_H #define POSIXSOURCE_H +#include <ghcplatform.h> + #define _POSIX_SOURCE 1 #define _POSIX_C_SOURCE 199506L #define _XOPEN_SOURCE 500 @@ -16,4 +18,12 @@ /* 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 */ |