From 8c4aa0ef998191ed828a37190dc179b91649938a Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Mon, 4 May 2015 20:17:51 +0300 Subject: Replace futimes with futimens. futimes is not standard function, and it's not available in uClibc. Use futimens which is POSIX. Suggested-by: Mike Frysinger Signed-off-by: Max Filippov --- src/ar.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ar.c') diff --git a/src/ar.c b/src/ar.c index caed7f3f..1320d07b 100644 --- a/src/ar.c +++ b/src/ar.c @@ -679,13 +679,13 @@ do_oper_extract (int oper, const char *arfname, char **argv, int argc, if (preserve_dates) { - struct timeval tv[2]; + struct timespec tv[2]; tv[0].tv_sec = arhdr->ar_date; - tv[0].tv_usec = 0; + tv[0].tv_nsec = 0; tv[1].tv_sec = arhdr->ar_date; - tv[1].tv_usec = 0; + tv[1].tv_nsec = 0; - if (unlikely (futimes (xfd, tv) != 0)) + if (unlikely (futimens (xfd, tv) != 0)) { error (0, errno, gettext ("cannot change modification time of %s"), -- cgit v1.2.3