diff options
author | Max Filippov <[email protected]> | 2015-05-04 20:17:51 +0300 |
---|---|---|
committer | Mark Wielaard <[email protected]> | 2015-05-05 10:34:13 +0200 |
commit | 8c4aa0ef998191ed828a37190dc179b91649938a (patch) | |
tree | a681a6909acbf3d9e1ff70aa2a3881779c98b64c /src/ar.c | |
parent | b88bece422ec249215f3ab5e848c4991bef68c40 (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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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"), |