From: Ian Jackson Date: Wed, 23 Mar 2016 18:27:46 +0000 (+0000) Subject: cgi-fcgi-interp: Implement stab_isnewer properly X-Git-Tag: archive/debian/5.0.0~64 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-utils.git;a=commitdiff_plain;h=421f622bcc0a5ae3d6e63e19f35e355238436a9b cgi-fcgi-interp: Implement stab_isnewer properly --- diff --git a/cprogs/cgi-fcgi-interp.c b/cprogs/cgi-fcgi-interp.c index 1d88f50..4403586 100644 --- a/cprogs/cgi-fcgi-interp.c +++ b/cprogs/cgi-fcgi-interp.c @@ -308,7 +308,11 @@ static void find_socket_path(void) { #endif /*timespeccmp*/ static bool stab_isnewer(const struct stat *a, const struct stat *b) { - return 0; +#ifdef st_mtime + return timespeccmp(&a->st_mtim, &b->st_mtim, >); +#else + return a->st_mtime > &b->st_mtime; +#endif } static bool check_garbage(void) {