aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/touch.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/posix/touch.c')
-rw-r--r--toys/posix/touch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/touch.c b/toys/posix/touch.c
index 22a1e2e8..cd7dd53d 100644
--- a/toys/posix/touch.c
+++ b/toys/posix/touch.c
@@ -97,7 +97,7 @@ void touch_main(void)
errno = 0;
ts->tv_sec = mktime(&tm);
- if (!s || *s || errno == EOVERFLOW) perror_exit("bad '%s'", date);
+ if (!s || *s || ts->tv_sec == -1) perror_exit("bad '%s'", date);
}
ts[1]=ts[0];