From: Paul Eggert Date: Mon, 8 Sep 2003 22:32:00 +0000 (+0000) Subject: [!HAVE_UTIMES_NULL]: Include , . X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cc0b7f8af10bd3b826f79e0cf596b24c742299c;p=pspp [!HAVE_UTIMES_NULL]: Include , . (utime_null): Fix typo: 'st' was sometimes called 'sb'. --- diff --git a/lib/utime.c b/lib/utime.c index f7107abdd3..25657eea9f 100644 --- a/lib/utime.c +++ b/lib/utime.c @@ -27,6 +27,11 @@ # include #endif +#if !HAVE_UTIMES_NULL +# include +# include +#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