diff -up ./src/cleaner.cc.org ./src/cleaner.cc
--- ./src/cleaner.cc.org	2024-06-20 15:59:07.568690826 +0000
+++ ./src/cleaner.cc	2024-06-20 18:44:40.612474139 +0000
@@ -55,7 +55,7 @@ void cleaner::WorkLoop()
 			return;
 
 		decltype(stamps) snapshot;
-		auto now = GetTime();
+		time_t now = GetTime();
 		{
 			lockuniq g(this);
 			snapshot = stamps;
@@ -98,15 +98,15 @@ void cleaner::WorkLoop()
 		time_t next = END_OF_TIME;
 		for (unsigned i = 0; i < ETYPE_MAX; ++i)
 		{
-			auto t = std::min(snapshot[i], stamps[i]);
+			time_t t = std::min(snapshot[i], stamps[i]);
 			next = std::min(next, t);
 			stamps[i] = t;
 		}
 		if (next <= now)
 			continue;
-		auto delta = next - now;
+		time_t delta = next - now;
 		// limit this to a day to avoid buggy STL behavior reported in the past
-		wait_for(g, std::min(long(delta), long(84600)), 1);
+		wait_for(g, std::min((time_t)(delta), (time_t)(84600)), 1);
 	}
 }
 
