From 53a08c47dc008c1a26310a622e72b42d0f88f791 Mon Sep 17 00:00:00 2001 From: jilles Date: Fri, 15 Jan 2016 20:55:44 +0000 Subject: MFC r293783: futimens/utimensat: Use the new system calls. Update the __FreeBSD_version check in lib/libc/sys/futimens.c and lib/libc/sys/utimensat.c. Before this, fallback code using futimes/futimesat/lutimes was used except when running on a sufficiently recent 11-current kernel. Also, update the history section in the man page. --- lib/libc/sys/futimens.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/libc/sys/futimens.c') diff --git a/lib/libc/sys/futimens.c b/lib/libc/sys/futimens.c index 2014cc5..59fb37f 100644 --- a/lib/libc/sys/futimens.c +++ b/lib/libc/sys/futimens.c @@ -42,8 +42,11 @@ futimens(int fd, const struct timespec times[2]) { struct timeval now, tv[2], *tvp; struct stat sb; + int osreldate; - if (__getosreldate() >= 1100056) + osreldate = __getosreldate(); + if (osreldate >= 1100056 || + (osreldate >= 1002506 && osreldate < 1100000)) return (__sys_futimens(fd, times)); if (times == NULL || (times[0].tv_nsec == UTIME_NOW && -- cgit v1.1