Commit fa19882f authored by Jakob Unterwurzacher's avatar Jakob Unterwurzacher

nodefs: implement the futimens(3) glibc function

This function is neither provided by the syscall package nor x/sys/unix.
parent c2130ac9
package nodefs
import (
"unsafe"
"syscall"
)
// futimens - futimens(3) calls utimensat(2) with "pathname" set to null and
// "flags" set to zero
func futimens(fd int, times *[2]syscall.Timespec) (err error) {
_, _, e1 := syscall.Syscall6(syscall.SYS_UTIMENSAT, uintptr(fd), 0, uintptr(unsafe.Pointer(times)), uintptr(0), 0, 0)
if e1 != 0 {
err = syscall.Errno(e1)
}
return
}
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