mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-28 04:46:44 -04:00
unix: add utimensat libc wrapper on darwin
Direct syscalls are no longer supported on darwin (CL 250437), so utimensat can be implemented as a wrapper around the libc function. The utimensat function was added in macOS 10.13 and Go 1.17 dropped support for macOS 10.12. This also allows to drop the fallback to setattrlistTimes which was used to set timestamps with nanosecond resolution before utimensat could be used, see golang/go#22528 and CL 74952. Change-Id: I206291277e6f7200ca7a659e29075968647779a6 Reviewed-on: https://go-review.googlesource.com/c/sys/+/251737 Trust: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:
committed by
Tobias Klauser
parent
36772127a2
commit
530d0810a4
@@ -118,7 +118,6 @@ var darwinTests = [...]darwinTest{
|
||||
{"sendfile", libc_sendfile_trampoline_addr},
|
||||
{"sendmsg", libc_sendmsg_trampoline_addr},
|
||||
{"sendto", libc_sendto_trampoline_addr},
|
||||
{"setattrlist", libc_setattrlist_trampoline_addr},
|
||||
{"setegid", libc_setegid_trampoline_addr},
|
||||
{"seteuid", libc_seteuid_trampoline_addr},
|
||||
{"setgid", libc_setgid_trampoline_addr},
|
||||
@@ -154,6 +153,7 @@ var darwinTests = [...]darwinTest{
|
||||
{"unlink", libc_unlink_trampoline_addr},
|
||||
{"unlinkat", libc_unlinkat_trampoline_addr},
|
||||
{"unmount", libc_unmount_trampoline_addr},
|
||||
{"utimensat", libc_utimensat_trampoline_addr},
|
||||
{"utimes", libc_utimes_trampoline_addr},
|
||||
{"wait4", libc_wait4_trampoline_addr},
|
||||
{"write", libc_write_trampoline_addr},
|
||||
|
||||
Reference in New Issue
Block a user