bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils-5.0.91: compilation error in utime.c


From: Jim Meyering
Subject: Re: coreutils-5.0.91: compilation error in utime.c
Date: Thu, 04 Dec 2003 21:13:04 +0100

Bruno Haible <address@hidden> wrote:
> On SuSE Linux 6.3 compilation fails:
...
> make[3]: *** [utime.o] Error 1

Thanks for the report.
That was reported a few months ago and was fixed by this patch:

Index: lib/utime.c
===================================================================
RCS file: /fetish/cu/lib/utime.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -u -r1.8 -r1.9
--- lib/utime.c 23 Jul 2003 06:24:12 -0000      1.8
+++ lib/utime.c 10 Sep 2003 06:33:25 -0000      1.9
@@ -27,6 +27,11 @@
 # include <utime.h>
 #endif
 
+#if !HAVE_UTIMES_NULL
+# include <sys/stat.h>
+# include <fcntl.h>
+#endif
+
 #include "full-write.h"
 #include "safe-read.h"
 
@@ -53,11 +58,11 @@ utime_null (const char *file)
   int fd;
   char c;
   int status = 0;
-  struct stat sb;
+  struct stat st;
 
   fd = open (file, O_RDWR);
   if (fd < 0
-      || fstat (fd, &sb) < 0
+      || fstat (fd, &st) < 0
       || safe_read (fd, &c, sizeof c) == SAFE_READ_ERROR
       || lseek (fd, (off_t) 0, SEEK_SET) < 0
       || full_write (fd, &c, sizeof c) != sizeof c




reply via email to

[Prev in Thread] Current Thread [Next in Thread]