X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FPosixSource.h;h=b3da60fe37ce36d85e3195b61a60c2d684808636;hb=6cf8982ac30be6836a0cdd8be5a6ac1a1a144213;hp=cd1aeea34cfbf715fc9e5713869b83b90fcbe7fc;hpb=a2a67cd520b9841114d69a87a423dabcb3b4368e;p=ghc-hetmet.git diff --git a/rts/PosixSource.h b/rts/PosixSource.h index cd1aeea..b3da60f 100644 --- a/rts/PosixSource.h +++ b/rts/PosixSource.h @@ -9,6 +9,8 @@ #ifndef POSIXSOURCE_H #define POSIXSOURCE_H +#include + #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 */