edsrzf / mmap-go

A portable mmap package for Go
BSD 3-Clause "New" or "Revised" License
938 stars 129 forks source link

NetBSD support #10

Closed artbin closed 8 years ago

edsrzf commented 8 years ago

Thanks for looking at this!

Since the two different msync functions are basically the same except for the constants, I think it would be better to actually keep things closer to how they were and just define the constants. So msync_netbsd.go can have:

const _SYS_MSYNC = 277
const _MS_SYNC = 0x04

And msync_unix.go:

const _SYS_MSYNC = syscall.SYS_MSYNC
const _MS_SYNC = syscall.MS_SYNC

Then change flush in mmap_unix.go to use those constants.

artbin commented 8 years ago

I changed the code

edsrzf commented 8 years ago

Thanks!