Skip to content

Commit

Permalink
Use -1 for fd for OpenBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
worr committed Dec 21, 2014
1 parent 1ea4b00 commit 305d6d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion secstring.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func NewSecString(str []byte) (*SecString, error) {
ret := &SecString{Length: len(str)}
var err error

ret.String, err = unix.Mmap(0, 0, ret.Length, unix.PROT_READ|unix.PROT_WRITE, unix.MAP_ANON|unix.MAP_PRIVATE)
ret.String, err = unix.Mmap(-1, 0, ret.Length, unix.PROT_READ|unix.PROT_WRITE, unix.MAP_ANON|unix.MAP_PRIVATE)
if err != nil {
memset(str, 0)
return nil, err
Expand Down

0 comments on commit 305d6d7

Please sign in to comment.