diff options
author | Jesper Schmitz Mouridsen <jsm@FreeBSD.org> | 2022-12-05 16:09:04 +0100 |
---|---|---|
committer | Jesper Schmitz Mouridsen <jsm@FreeBSD.org> | 2022-12-05 16:12:42 +0100 |
commit | 9d74a305e773815efa751ef3e4182bb660450ad2 (patch) | |
tree | 1c2b96e15eb2f00bd6e43e9f8079a7f230bdad51 /x11-clocks/wmclockmon/files/patch-src_main.c | |
parent | devel/pecl-jsmin: Cleanup (diff) |
x11-clocks/wmclockmon: resurrect
Update to gtk20 with patch from debian.
Fix build with -fno-common from openbsd patches.
PR: 268143
Diffstat (limited to 'x11-clocks/wmclockmon/files/patch-src_main.c')
-rw-r--r-- | x11-clocks/wmclockmon/files/patch-src_main.c | 33 |
1 files changed, 33 insertions, 0 deletions
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..729b0b4eda52 --- /dev/null +++ b/x11-clocks/wmclockmon/files/patch-src_main.c @@ -0,0 +1,33 @@ +--- src/main.c.orig 2005-04-07 09:37:43 UTC ++++ src/main.c +@@ -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 @@ static void time_update() { + 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 @@ static void time_update() { + swtime -= 1000; + else + if (swtime < 0) swtime += 1000; ++ } ++ else { ++ timeinfos = localtime(&tnow); + } + } + |