GHC 8.10 fails to build on FreeBSD 12.2
Summary
After ddb152d5, due to a late include of <sys/mman.h> after PosixSource.h
, rts/sm/Storage.c fails to compile on FreeBSD 12.2 (likely also other releases) with MAP_ANONYMOUS undefined:
rts/sm/Storage.c: In function 'allocateWrite':
rts/sm/Storage.c:1767:57: error:
error: 'MAP_ANONYMOUS' undeclared (first use in this function)
1767 | return mmapForLinker(bytes, PROT_READ | PROT_WRITE, MAP_ANONYMOUS, -1, 0);
| ^~~~~~~~~~~~~
|
`gcc9' failed in phase `C Compiler'. (Exit code: 1)
)
Steps to reproduce
Build head of ghc-8.10 branch on a FreeBSD system.
Environment
- GHC version used: 8.8 was used as boot GHC.
Optional:
- Operating System: FreeBSD 12.2
- System Architecture: x86_64
Cc: @angerman