summaryrefslogtreecommitdiff
path: root/editors/dasher/patches/patch-ac
blob: de3fb4c12765ba208a6e8d419fb941c260aa8bae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$NetBSD: patch-ac,v 1.4 2007/11/05 20:01:00 drochner Exp $

--- Src/DasherCore/BasicLog.cpp.orig	2007-10-15 15:55:00.000000000 +0200
+++ Src/DasherCore/BasicLog.cpp
@@ -79,6 +79,7 @@ std::string CBasicLog::GetDateStamp() {
 #else
   struct timeval sTimeBuffer;
   struct timezone sTimezoneBuffer;
+  time_t help; /* workaround for bad NetBSD struct timeval */
 #endif
   char* szTimeLine = NULL;
 
@@ -87,7 +88,8 @@ std::string CBasicLog::GetDateStamp() {
     szTimeLine = ctime(&(sTimeBuffer.time));
 #else
     gettimeofday(&sTimeBuffer, &sTimezoneBuffer);
-    szTimeLine = ctime((const time_t *)&(sTimeBuffer.tv_sec));
+    help = sTimeBuffer.tv_sec;
+    szTimeLine = ctime(&help);
 #endif
 
     return std::string(szTimeLine).substr(0, 24);