From: Todd C. Miller Date: Sun, 18 Jun 1995 19:24:58 +0000 (+0000) Subject: now expect old-style utime(3) if utime() can't take NULL as an arg X-Git-Tag: SUDO_1_4_0~343 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e30f821d70b4bee7e794d81a71bca5238e6c77b;p=sudo now expect old-style utime(3) if utime() can't take NULL as an arg --- diff --git a/check.c b/check.c index 0dd5cce66..16520bc6b 100644 --- a/check.c +++ b/check.c @@ -93,10 +93,12 @@ static char rcsid[] = "$Id$"; #include #endif /* HAVE_AFS */ #ifdef HAVE_UTIME +#ifdef HAVE_UTIME_H #include +#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 */