I took this fix from Debian [0]. It builds and works fine on amd64 and
macppc.

OK?

Charlène.


[0]
https://sources.debian.org/patches/wmweather/2.4.7-3/957956_gcc10.diff/


Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/wmweather/Makefile,v
retrieving revision 1.30
diff -u -p -u -p -r1.30 Makefile
--- Makefile    12 Jul 2019 20:51:24 -0000      1.30
+++ Makefile    1 Feb 2021 13:55:54 -0000
@@ -3,6 +3,7 @@
 COMMENT=               wm-dockapp; weather monitor
 
 DISTNAME=              wmweather-2.4.7
+REVISION=              0
 CATEGORIES=            x11 x11/windowmaker
 
 HOMEPAGE=              http://people.debian.org/~godisch/wmweather/
Index: patches/patch-src_wmgeneral_c
===================================================================
RCS file: patches/patch-src_wmgeneral_c
diff -N patches/patch-src_wmgeneral_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_wmgeneral_c       1 Feb 2021 13:55:54 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Fix the build with -fno-common
+
+Index: src/wmgeneral.c
+--- src/wmgeneral.c.orig
++++ src/wmgeneral.c
+@@ -85,6 +85,7 @@ Window               iconwin, win;
+ GC                    NormalGC;
+ XpmIcon               wmgen;
+ Pixmap                pixmask;
++Display               *display;
+ 
+   /*****************/
+  /* Mouse Regions */
Index: patches/patch-src_wmgeneral_h
===================================================================
RCS file: patches/patch-src_wmgeneral_h
diff -N patches/patch-src_wmgeneral_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_wmgeneral_h       1 Feb 2021 13:55:54 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Fix the build with -fno-common
+
+Index: src/wmgeneral.h
+--- src/wmgeneral.h.orig
++++ src/wmgeneral.h
+@@ -36,7 +36,7 @@ typedef struct {
+  /* Global variable */
+ /*******************/
+ 
+-Display               *display;
++extern Display                *display;
+ 
+   /***********************/
+  /* Function Prototypes */

Reply via email to