summaryrefslogtreecommitdiffstats
path: root/src/ar.c
diff options
context:
space:
mode:
authorMax Filippov <[email protected]>2015-05-04 20:17:51 +0300
committerMark Wielaard <[email protected]>2015-05-05 10:34:13 +0200
commit8c4aa0ef998191ed828a37190dc179b91649938a (patch)
treea681a6909acbf3d9e1ff70aa2a3881779c98b64c /src/ar.c
parentb88bece422ec249215f3ab5e848c4991bef68c40 (diff)
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 <[email protected]> Signed-off-by: Max Filippov <[email protected]>
Diffstat (limited to 'src/ar.c')
-rw-r--r--src/ar.c8
1 files changed, 4 insertions, 4 deletions
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"),