patch for touch.c v1.4.2

Larry Brigman larry.brigman at gmail.com
Mon Apr 9 23:48:27 UTC 2007


When Wall is on busybox config also turns on Werror.  Because of this
touch causes the make to fail because of invalid NULL parameter.

This patch fixes the problem.

patch to coreutils/touch.c
--- touch.c.org 2007-04-09 10:42:24.000000000 -0700
+++ touch.c     2007-04-09 11:08:48.000000000 -0700
@@ -31,6 +31,7 @@
        int fd;
        int flags;
        int status = EXIT_SUCCESS;
+       struct utimbuf times;

        flags = getopt32(argc, argv, "c");

@@ -41,7 +42,7 @@
        }

        do {
-               if (utime(*argv, NULL)) {
+               if (utime(*argv, &times)) {
                        if (errno == ENOENT) {  /* no such file*/
                                if (flags & 1) {        /* Creation is
disabled, so ignore. */
                                        continue;



More information about the busybox mailing list