summaryrefslogtreecommitdiffstats
path: root/usr.bin/gzip/gzip.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-02-17 19:53:41 +0000
committerdim <dim@FreeBSD.org>2015-02-17 19:53:41 +0000
commitd27bd4650ea928097e260433cb5c69be0dda440f (patch)
tree9b840acec4a7a5a64b3092e4f4cbb8197e629360 /usr.bin/gzip/gzip.c
parent9377b5ad0feb5dd018ed6cfc6378ac19c1252dfe (diff)
parent68a4902d98c88ebff2f1dfd8bee849d62233ba60 (diff)
downloadFreeBSD-src-d27bd4650ea928097e260433cb5c69be0dda440f.zip
FreeBSD-src-d27bd4650ea928097e260433cb5c69be0dda440f.tar.gz
Merge ^/head r278756 through r278915.
Diffstat (limited to 'usr.bin/gzip/gzip.c')
-rw-r--r--usr.bin/gzip/gzip.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/gzip/gzip.c b/usr.bin/gzip/gzip.c
index 9f92b6a..f197f18 100644
--- a/usr.bin/gzip/gzip.c
+++ b/usr.bin/gzip/gzip.c
@@ -1070,7 +1070,7 @@ out2:
static void
copymodes(int fd, const struct stat *sbp, const char *file)
{
- struct timeval times[2];
+ struct timespec times[2];
struct stat sb;
/*
@@ -1098,10 +1098,10 @@ copymodes(int fd, const struct stat *sbp, const char *file)
if (fchmod(fd, sb.st_mode) < 0)
maybe_warn("couldn't fchmod: %s", file);
- TIMESPEC_TO_TIMEVAL(&times[0], &sb.st_atim);
- TIMESPEC_TO_TIMEVAL(&times[1], &sb.st_mtim);
- if (futimes(fd, times) < 0)
- maybe_warn("couldn't utimes: %s", file);
+ times[0] = sb.st_atim;
+ times[1] = sb.st_mtim;
+ if (futimens(fd, times) < 0)
+ maybe_warn("couldn't futimens: %s", file);
/* only try flags if they exist already */
if (sb.st_flags != 0 && fchflags(fd, sb.st_flags) < 0)
OpenPOWER on IntegriCloud