]> granicus.if.org Git - sudo/commitdiff
now expect old-style utime(3) if utime() can't take NULL as an arg
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 18 Jun 1995 19:24:58 +0000 (19:24 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 18 Jun 1995 19:24:58 +0000 (19:24 +0000)
check.c

diff --git a/check.c b/check.c
index 0dd5cce6673864cbc92165777f68a4577e57dde7..16520bc6b0493e73ee9ea04c1a89f33906509daa 100644 (file)
--- a/check.c
+++ b/check.c
@@ -93,10 +93,12 @@ static char rcsid[] = "$Id$";
 #include <afs/kautils.h>
 #endif /* HAVE_AFS */
 #ifdef HAVE_UTIME
+#ifdef HAVE_UTIME_H
 #include <utime.h>
+#endif /* HAVE_UTIME_H */
 #else
 #include "utime.h"
-#endif
+#endif /* HAVE_UTIME */
 
 
 /*
@@ -257,12 +259,12 @@ static int check_timestamp()
 
 static void update_timestamp()
 {
-    struct utimbuf *utp = NULL;
 #if defined(HAVE_UTIME) && !defined(HAVE_UTIME_NULL)
-    struct utimbuf ut;
+    time_t utp[2];
 
-    ut.actime = ut.modtime = time(NULL);
-    utp = &ut;
+    utp[0] = utp[1] = time(NULL);
+#else
+    struct utimbuf *utp = NULL;
 #endif /* HAVE_UTIME && !HAVE_UTIME_NULL */
 
     /* become root */