chiark / gitweb /
cgi-fcgi-interp: Implement stab_isnewer properly
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 23 Mar 2016 18:27:46 +0000 (18:27 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 23 Mar 2016 18:27:46 +0000 (18:27 +0000)
cprogs/cgi-fcgi-interp.c

index 1d88f50..4403586 100644 (file)
@@ -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) {