$OpenBSD: patch-src_log4c_layout_type_dated_c,v 1.1.1.1 2012/05/11 11:43:49 ajacoutot Exp $

warning: passing argument 1 of 'gmtime_r' from incompatible pointer type

--- src/log4c/layout_type_dated.c.orig	Fri May 11 12:45:04 2012
+++ src/log4c/layout_type_dated.c	Fri May 11 12:47:21 2012
@@ -28,7 +28,9 @@ static const char* dated_format(
 #warning gmtime() routine should be defined in sd_xplatform
 #endif
     struct tm   tm;
-    gmtime_r(&a_event->evt_timestamp.tv_sec, &tm);
+    time_t t;
+    t = (time_t)a_event->evt_timestamp.tv_sec;
+    gmtime_r(&t, &tm);
     snprintf(buffer, sizeof(buffer), "%04d%02d%02d %02d:%02d:%02d.%03ld %-8s %s- %s\n",
              tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
              tm.tm_hour, tm.tm_min, tm.tm_sec,
