$NetBSD: patch-aa,v 1.5.10.1 2009/01/04 13:23:24 tron Exp $

--- src/SimpleLogger.cc~	2008-10-19 11:16:24.000000000 -0400
+++ src/SimpleLogger.cc	2009-01-03 17:46:14.000000000 -0500
@@ -147,7 +147,12 @@ void SimpleLogger::writeLog(std::ostream
   gettimeofday(&tv, 0);
   char datestr[27]; // 'YYYY-MM-DD hh:mm:ss.uuuuuu'+'\0' = 27 bytes
   struct tm tm;
+#ifdef __NetBSD__ /* work around API bug on 64-bit platforms in netbsd<6.0 */
+  time_t tmp = tv.tv_sec;
+  localtime_r(&tmp, &tm);
+#else
   localtime_r(&tv.tv_sec, &tm);
+#endif
   size_t dateLength =
     strftime(datestr, sizeof(datestr), "%Y-%m-%d %H:%M:%S", &tm);
   assert(dateLength <= (size_t)20);
