Commit 8b8824e7 authored by Ivan Markin's avatar Ivan Markin Committed by Tobias Klauser

unix: don't use local syscall number in Pledge()

Change-Id: Ifecafeedd733d4b33ef082a8f505165de9bac20a
GitHub-Last-Rev: 44c40b042479bb3a4a73838b2536adbb715cde11
GitHub-Pull-Request: golang/sys#20
Reviewed-on: https://go-review.googlesource.com/c/142318Reviewed-by: 's avatarTobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 5535b4e6
......@@ -15,10 +15,6 @@ import (
"unsafe"
)
const (
_SYS_PLEDGE = 108
)
// Pledge implements the pledge syscall.
//
// The pledge syscall does not accept execpromises on OpenBSD releases
......@@ -63,7 +59,7 @@ func Pledge(promises, execpromises string) error {
expr = unsafe.Pointer(exptr)
}
_, _, e := syscall.Syscall(_SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), uintptr(expr), 0)
_, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), uintptr(expr), 0)
if e != 0 {
return e
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment