14 lines
236 B
Go
14 lines
236 B
Go
//go:build mesh_embedded
|
|
|
|
package native
|
|
|
|
import (
|
|
"os"
|
|
"syscall"
|
|
)
|
|
|
|
// LockFile adapts Go's uintptr file descriptor to the integer flock API.
|
|
func LockFile(file *os.File, how int) error {
|
|
return syscall.Flock(int(file.Fd()), how)
|
|
}
|