awnumar/memguard

MADV_DONTDUMP and MAP_ANONYMOUS do not exist on OpenBSD amd64

stephane-martin opened this issue · 1 comments

Hello,

compilation fails on OpenBSD because MADV_DONTDUMP and MAP_ANONYMOUS do not exist in golang/x/sys/unix.

  • MADV_DONTDUMP is not actually supported by OpenBSD => should be dropped there
  • MAP_ANONYMOUS shoud exist, but strangely golang/x/sys/unix does not have it on amd64. But MAP_ANON is there (???) and can be used.
  • 0x00020000 does not exist on OpenBSD

Thanks!

Thanks for reporting this. In addition to fixing this issue, I have also created a patch against sys/unix that adds the MAP_ANONYMOUS flag to the set of OpenBSD constants.