summaryrefslogtreecommitdiff
path: root/x11/gtkmm-utils/patches/patch-aa
blob: a0bfe53d5b6c7c40b72819740213276fac3bbd13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
$NetBSD: patch-aa,v 1.2 2012/05/07 01:41:44 dholland Exp $

- fix build with latest glib2
- use time_t correctly

--- glibmm-utils/date.cc.orig	2008-01-16 17:22:26.000000000 +0000
+++ glibmm-utils/date.cc
@@ -25,7 +25,7 @@
 
 #include <sys/time.h>
 
-#include <glib/gmessages.h>
+#include <glib.h>
 
 #include <glibmm/convert.h>
 #include <glibmm/date.h>
@@ -50,7 +50,10 @@ get_current_daytime_generic(Glib::ustrin
 
     // Obtain the time of day, and convert it to a tm struct.
     gettimeofday(&tv, NULL);
-    ptm = localtime(&tv.tv_sec);
+    {
+        time_t thetime = tv.tv_sec;
+        ptm = localtime(&thetime);
+    }
 
     strftime(time_string, sizeof (time_string), format, ptm);