diff --git a/unix/fcntl_openbsd.go b/unix/fcntl_openbsd.go deleted file mode 100644 index 90bd5550b..000000000 --- a/unix/fcntl_openbsd.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package unix - -import "unsafe" - -// FcntlInt performs a fcntl syscall on fd with the provided command and argument. -func FcntlInt(fd uintptr, cmd, arg int) (int, error) { - return fcntl(int(fd), cmd, arg) -} - -// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. -func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { - _, err := fcntlPtr(int(fd), cmd, unsafe.Pointer(lk)) - return err -} diff --git a/unix/syscall_openbsd.go b/unix/syscall_openbsd.go index 15dd6d6a4..49dc1df1a 100644 --- a/unix/syscall_openbsd.go +++ b/unix/syscall_openbsd.go @@ -174,6 +174,17 @@ func Getresgid() (rgid, egid, sgid int) { //sys fcntl(fd int, cmd int, arg int) (n int, err error) //sys fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) = SYS_FCNTL +// FcntlInt performs a fcntl syscall on fd with the provided command and argument. +func FcntlInt(fd uintptr, cmd, arg int) (int, error) { + return fcntl(int(fd), cmd, arg) +} + +// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. +func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { + _, err := fcntlPtr(int(fd), cmd, unsafe.Pointer(lk)) + return err +} + //sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {