github.com/twelsh-aw/go/src@v0.0.0-20230516233729-a56fe86a7c81/runtime/export_openbsd_test.go (about)

     1  // Copyright 2022 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build openbsd && !mips64
     6  
     7  package runtime
     8  
     9  func Fcntl(fd, cmd, arg uintptr) (uintptr, uintptr) {
    10  	r := fcntl(int32(fd), int32(cmd), int32(arg))
    11  	if r < 0 {
    12  		return ^uintptr(0), uintptr(-r)
    13  	}
    14  	return uintptr(r), 0
    15  }