aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/touch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/coreutils/touch.c b/coreutils/touch.c
index dff68cb00..68fb625fe 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -147,7 +147,8 @@ int touch_main(int argc UNUSED_PARAM, char **argv)
147 if (reference_file) { 147 if (reference_file) {
148 struct stat stbuf; 148 struct stat stbuf;
149 xstat(reference_file, &stbuf); 149 xstat(reference_file, &stbuf);
150 timebuf[1].tv_sec = timebuf[0].tv_sec = stbuf.st_mtime; 150 timebuf[0].tv_sec = stbuf.st_atime;
151 timebuf[1].tv_sec = stbuf.st_mtime;
151 /* Can use .st_mtim.tv_nsec 152 /* Can use .st_mtim.tv_nsec
152 * (or is it .st_mtimensec?? see date.c) 153 * (or is it .st_mtimensec?? see date.c)
153 * to set microseconds too. 154 * to set microseconds too.