diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim index 17bcc420ed..5bd43fe9cf 100644 --- a/lib/posix/posix.nim +++ b/lib/posix/posix.nim @@ -1375,8 +1375,6 @@ var ## Share changes. MAP_PRIVATE* {.importc, header: "".}: cint ## Changes are private. - MAP_POPULATE* {.importc, header: "".}: cint - ## Populate (prefault) page tables for a mapping. MAP_FIXED* {.importc, header: "".}: cint ## Interpret addr exactly. MS_ASYNC* {.importc, header: "".}: cint @@ -1581,6 +1579,16 @@ var MSG_OOB* {.importc, header: "".}: cint ## Out-of-band data. + +when defined(linux): + var + MAP_POPULATE* {.importc, header: "".}: cint + ## Populate (prefault) page tables for a mapping. +else: + var + MAP_POPULATE*: cint = 0 + + when defined(macosx): var MSG_HAVEMORE* {.importc, header: "".}: cint