diff options
Diffstat (limited to 'src/ar.c')
| -rw-r--r-- | src/ar.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -685,7 +685,14 @@ do_oper_extract (int oper, const char *arfname, char **argv, int argc, tv[1].tv_sec = arhdr->ar_date; tv[1].tv_nsec = 0; +#ifdef HAVE_FUTIMENS if (unlikely (futimens (xfd, tv) != 0)) +#else + struct timeval times[2]; + TIMESPEC_TO_TIMEVAL (×[0], &tv[0]); + TIMESPEC_TO_TIMEVAL (×[1], &tv[1]); + if (unlikely (futimes (xfd, times) != 0)) +#endif { error (0, errno, gettext ("cannot change modification time of %s"), |
