pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/x11/wmweather x11/wmweather: apply patch from Romain D...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e2325184fdb9
branches: trunk
changeset: 455759:e2325184fdb9
user: dholland <dholland%pkgsrc.org@localhost>
date: Sat Jul 10 17:13:44 2021 +0000
description:
x11/wmweather: apply patch from Romain Dolbeau in PR 55284.
Fixes time_t abuse leading to crashes on 32-bit platforms.
diffstat:
x11/wmweather/Makefile | 4 +-
x11/wmweather/distinfo | 4 +-
x11/wmweather/patches/patch-wmweather.c | 36 +++++++++++++++++++++++++++++---
3 files changed, 36 insertions(+), 8 deletions(-)
diffs (85 lines):
diff -r 2e516dc2db8f -r e2325184fdb9 x11/wmweather/Makefile
--- a/x11/wmweather/Makefile Sat Jul 10 16:48:24 2021 +0000
+++ b/x11/wmweather/Makefile Sat Jul 10 17:13:44 2021 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.66 2021/04/21 13:25:33 adam Exp $
+# $NetBSD: Makefile,v 1.67 2021/07/10 17:13:44 dholland Exp $
DISTNAME= wmweather-2.4.7
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= x11
MASTER_SITES= https://people.debian.org/~godisch/wmweather/
diff -r 2e516dc2db8f -r e2325184fdb9 x11/wmweather/distinfo
--- a/x11/wmweather/distinfo Sat Jul 10 16:48:24 2021 +0000
+++ b/x11/wmweather/distinfo Sat Jul 10 17:13:44 2021 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.13 2020/09/13 20:12:08 wiz Exp $
+$NetBSD: distinfo,v 1.14 2021/07/10 17:13:44 dholland Exp $
SHA1 (wmweather-2.4.7.tar.gz) = a227b0efe8e141e6fde0dbe21a6bfb9cad026aab
RMD160 (wmweather-2.4.7.tar.gz) = 1dae2f985f6b2cbd48da9a0b3adc1ced91b693bb
SHA512 (wmweather-2.4.7.tar.gz) = d9d0c46e85a24aaa278aa75e0fcd51fc417c3c094d9e69c5820a288955c3ebdde21a24b26964824d9275a41ec053e3d942b185b24088d806e033e311e6e09108
Size (wmweather-2.4.7.tar.gz) = 86220 bytes
SHA1 (patch-aa) = a882d59ff36a5fb23822ab9288c48f62edc094d8
-SHA1 (patch-wmweather.c) = ef7e6a9ebc4bd28c3b99bf49715f8e02f670028a
+SHA1 (patch-wmweather.c) = 7c5e0f3e379e82333dbdd7b6799e4398dc06e815
diff -r 2e516dc2db8f -r e2325184fdb9 x11/wmweather/patches/patch-wmweather.c
--- a/x11/wmweather/patches/patch-wmweather.c Sat Jul 10 16:48:24 2021 +0000
+++ b/x11/wmweather/patches/patch-wmweather.c Sat Jul 10 17:13:44 2021 +0000
@@ -1,10 +1,11 @@
-$NetBSD: patch-wmweather.c,v 1.1 2016/06/23 18:24:07 dholland Exp $
+$NetBSD: patch-wmweather.c,v 1.2 2021/07/10 17:13:44 dholland Exp $
Use ctype.h functions correctly.
+Use the proper type with time().
---- wmweather.c~ 2009-07-03 16:00:38.000000000 +0000
+--- wmweather.c.orig 2019-02-13 19:54:49.000000000 +0000
+++ wmweather.c
-@@ -270,7 +270,7 @@ static void do_conf(const char *rcfile)
+@@ -269,7 +269,7 @@ static void do_conf(const char *rcfile)
exit(1);
}
for (i = 0; i < 4; i++)
@@ -13,7 +14,7 @@
if (station != NULL)
free(station);
station = strdup(optarg);
-@@ -407,7 +407,7 @@ static void do_opts(int argc, char *argv
+@@ -406,7 +406,7 @@ static void do_opts(int argc, char *argv
exit(1);
}
for (i = 0; i < 4; i++)
@@ -22,3 +23,30 @@
if (station != NULL)
free(station);
station = optarg;
+@@ -690,11 +690,12 @@ static void update(int force_read)
+ char buffer[MAX_STRING], *i;
+ int line, n, q, sgn;
+ long l = 0;
++ time_t tl;
+
+- time(&l);
+- tm = gmtime(&l);
++ time(&tl);
++ tm = gmtime(&tl);
+ utc_diff = tm->tm_hour;
+- tm = localtime(&l);
++ tm = localtime(&tl);
+ utc_diff = (tm->tm_hour - utc_diff + 24) % 24 * 3600;
+
+ if (stat(report, &rst) < 0 && errno != ENOENT) {
+@@ -1129,8 +1130,8 @@ static void update(int force_read)
+
+ } else {
+
+- time(&l);
+- tm = localtime(&l);
++ time(&tl);
++ tm = localtime(&tl);
+ if (gusting) {
+ showwinddir = tm->tm_sec % 30 < 10;
+ showgusting = tm->tm_sec % 30 >= 10 && tm->tm_sec % 30 < 20;
Home |
Main Index |
Thread Index |
Old Index