[!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 8 Sep 2003 22:32:00 +0000 (22:32 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 8 Sep 2003 22:32:00 +0000 (22:32 +0000)
(utime_null): Fix typo: 'st' was sometimes called 'sb'.

lib/utime.c

index f7107abdd3653f88ae829a9362032dfd00156fbc..25657eea9f19559c3104ebba745c1aedb53a3fe2 100644 (file)
 # 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