<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40726 >

 Windows gtk-client compilation is broken in current TRUNK due to
localtime_r call. Luckily we don't really need reentrant version. Fix
attached.


 - ML

diff -Nurd -X.diff_ignore freeciv/client/gui-gtk-2.0/chatline.c freeciv/client/gui-gtk-2.0/chatline.c
--- freeciv/client/gui-gtk-2.0/chatline.c	2009-02-16 19:46:24.000000000 +0200
+++ freeciv/client/gui-gtk-2.0/chatline.c	2009-02-17 10:28:08.000000000 +0200
@@ -87,11 +87,11 @@
   if (show_chat_message_time) {
     char timebuf[64];
     time_t now;
-    struct tm now_tm;
+    struct tm *now_tm;
 
     now = time(NULL);
-    localtime_r(&now, &now_tm);
-    strftime(timebuf, sizeof(timebuf), "[%H:%M:%S] ", &now_tm);
+    now_tm = localtime(&now);
+    strftime(timebuf, sizeof(timebuf), "[%H:%M:%S] ", now_tm);
     gtk_text_buffer_insert(buf, &i, timebuf, -1);
   }
 
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to