Commit 1e3dc3d5 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

syscall: make Utimes on Solaris match all the other geese

Updates #14892

Change-Id: I640c6e1635ccdf611f219521a7d297a9885c4cb3
Reviewed-on: https://go-review.googlesource.com/31446
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 4859f6a4
......@@ -279,7 +279,7 @@ func UtimesNano(path string, ts []Timespec) (err error) {
tv[i].Sec = ts[i].Sec
tv[i].Usec = ts[i].Nsec / 1000
}
return Utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
}
//sys fcntl(fd int, cmd int, arg int) (val int, err error)
......@@ -494,7 +494,7 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error)
//sys Ftruncate(fd int, length int64) (err error)
//sys Umask(newmask int) (oldmask int)
//sys Unlink(path string) (err error)
//sys Utimes(path string, times *[2]Timeval) (err error)
//sys utimes(path string, times *[2]Timeval) (err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_bind
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_connect
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
......@@ -527,3 +527,10 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
}
return
}
func Utimes(path string, tv []Timeval) error {
if len(tv) != 2 {
return EINVAL
}
return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
}
......@@ -953,7 +953,7 @@ func Unlink(path string) (err error) {
return
}
func Utimes(path string, times *[2]Timeval) (err error) {
func utimes(path string, times *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
......
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