← Commit list

ac2d4d88c

Denys Vlasenko
Denys Vlasenko
2021-08-15
SUCCESS Duration: 151s

Subject

touch: fix SEGV if !ENABLE_FEATURE_TOUCH_SUSV3

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

coreutils/touch.c+2 -0
@@ -127,6 +127,7 @@ int touch_main(int argc UNUSED_PARAM, char **argv)
#endif
);
+#if ENABLE_FEATURE_TOUCH_SUSV3
timebuf[0].tv_nsec = timebuf[1].tv_nsec = UTIME_NOW;
if (opts & OPT_r) {
struct stat stbuf;
@@ -160,6 +161,7 @@ int touch_main(int argc UNUSED_PARAM, char **argv)
timebuf[1].tv_nsec = UTIME_OMIT;
if ((opts & (OPT_a|OPT_m)) == OPT_m)
timebuf[0].tv_nsec = UTIME_OMIT;
+#endif
argv += optind;
do {