changeset 24320:3a7e64596ae0

[!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>. (utime_null): Fix typo: 'st' was sometimes called 'sb'.
author Paul Eggert <eggert@cs.ucla.edu>
date Mon, 08 Sep 2003 22:32:00 +0000
parents e481da2c5945
children f5385d796dda
files lib/utime.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lib/utime.c	Mon Sep 08 21:00:16 2003 +0000
+++ b/lib/utime.c	Mon Sep 08 22:32:00 2003 +0000
@@ -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 @@
   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