Ticket #5135 (closed bug: wontfix)
compilation failure on OS X 10.4 due to _POSIX_C_SOURCE
|Reported by:||guest||Owned by:||igloo|
|Operating System:||MacOS X||Architecture:||powerpc|
|Type of failure:||Building GHC failed||Difficulty:|
|Test Case:||Blocked By:|
In rts/PosixSource.h various standards and extensions are enabled. This yields in sys/types.h on Darwin *not* defining u_* typedefs. The code however relies on this. This problem has been noted already, and hence a hack to define _DARWIN_C_SOURCE has been added which works on Darwin 9 and up.
On Darwin 8, however, this define doesn't exist in sys/types.h. Without wanting to change the u_*, I resorted to the rather hackish fix as attached, such that sys/types.h is included on Darwin before various standards are set, and hence the u_* types will disappear.