summaryrefslogtreecommitdiff
path: root/x11-clocks/wmclockmon
diff options
context:
space:
mode:
authorShaun Amott <shaun@FreeBSD.org>2006-07-18 20:56:24 +0000
committerShaun Amott <shaun@FreeBSD.org>2006-07-18 20:56:24 +0000
commit519f691b1c98099387686e066fdfc2d08baadad2 (patch)
tree68d2711113bd16ac5c5bad2a476d70bdac308009 /x11-clocks/wmclockmon
parentFix a crash that can occur when a blocked user is removed from the MSN (diff)
Fix Internet time calculation.
PR: ports/86334 Submitted by: Frank Altpeter <frank@altpeter.de> Patched by: shaun (me), Soeren Straarup <xride@x12.dk> (maintainer) Approved by: ahze (mentor, implicit)
Notes
Notes: svn path=/head/; revision=168170
Diffstat (limited to 'x11-clocks/wmclockmon')
-rw-r--r--x11-clocks/wmclockmon/Makefile2
-rw-r--r--x11-clocks/wmclockmon/files/patch-src_main.c33
2 files changed, 34 insertions, 1 deletions
diff --git a/x11-clocks/wmclockmon/Makefile b/x11-clocks/wmclockmon/Makefile
index 741646d8e954..c61343f5d5d6 100644
--- a/x11-clocks/wmclockmon/Makefile
+++ b/x11-clocks/wmclockmon/Makefile
@@ -7,7 +7,7 @@
PORTNAME= wmclockmon
PORTVERSION= 0.8.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11-clocks windowmaker
MASTER_SITES= http://tnemeth.free.fr/projets/programmes/
diff --git a/x11-clocks/wmclockmon/files/patch-src_main.c b/x11-clocks/wmclockmon/files/patch-src_main.c
new file mode 100644
index 000000000000..d52006326a27
--- /dev/null
+++ b/x11-clocks/wmclockmon/files/patch-src_main.c
@@ -0,0 +1,33 @@
+--- src/main.c.orig Thu Apr 7 11:37:43 2005
++++ src/main.c Tue Jul 18 22:20:25 2006
+@@ -51,7 +51,7 @@
+ #define FREE(data) {if (data) free(data); data = NULL;}
+ #define SET_STRING(str, val) {if (str) free(str); str = xstrdup(val);}
+
+-#if defined(netbsd) || defined(openbsd) || defined(freebsd) || defined(darwin)
++#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__APPLE__)
+ # define BSDTIMEZONE
+ #endif
+
+@@ -1270,10 +1270,10 @@
+ time_t tnow;
+
+ time(&tnow);
+- timeinfos = localtime(&tnow);
+
+ if (time_mode == INTERNET) {
+ long localtmzone;
++ timeinfos = gmtime(&tnow);
+ swtime = timeinfos->tm_hour * 3600
+ + timeinfos->tm_min * 60
+ + timeinfos->tm_sec;
+@@ -1290,6 +1290,9 @@
+ swtime -= 1000;
+ else
+ if (swtime < 0) swtime += 1000;
++ }
++ else {
++ timeinfos = localtime(&tnow);
+ }
+ }
+