aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/gzip
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2015-02-17 13:12:54 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2015-02-17 13:12:54 +0000
commitd6b3ef634c48442728bc03797d74a1a4fe5722fa (patch)
treed989f5cf52fa60de20029a0d631f3107bc5d494a /usr.bin/gzip
parent6da235a325b8052870893e2f9520bbe080161fd7 (diff)
downloadsrc-d6b3ef634c48442728bc03797d74a1a4fe5722fa.tar.gz
src-d6b3ef634c48442728bc03797d74a1a4fe5722fa.zip
Notes
Diffstat (limited to 'usr.bin/gzip')
-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 9f92b6af8108..f197f186c95c 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)