Index: Makefile
===================================================================
RCS file: /cvs/ports/math/gbc/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- Makefile	21 Jul 2019 04:12:10 -0000	1.3
+++ Makefile	30 Jan 2021 15:23:09 -0000
@@ -5,6 +5,7 @@ BROKEN-sparc64 =	Bus error during build
 COMMENT =	GNU version of the arbitrary precision calculators bc and dc
 DISTNAME =	bc-1.07.1
 PKGNAME =	g${DISTNAME}
+REVISION =	0
 CATEGORIES =	math
 
 HOMEPAGE =	https://www.gnu.org/software/bc/
Index: patches/patch-bc_global_h
===================================================================
RCS file: patches/patch-bc_global_h
diff -N patches/patch-bc_global_h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-bc_global_h	30 Jan 2021 15:23:09 -0000
@@ -0,0 +1,22 @@
+$OpenBSD$
+
+Fix for -fno-common
+Identical to FreeBSD's fix:
+https://svnweb.freebsd.org/ports/head/math/gnubc/files/patch-bc_global.h?revision=547437&view=co
+
+Index: bc/global.h
+--- bc/global.h.orig
++++ bc/global.h
+@@ -112,9 +112,9 @@ EXTERN int n_history;
+ 
+ #if defined(LIBEDIT)
+ /* LIBEDIT data */
+-EditLine *edit INIT(NULL);
+-History  *hist;
+-HistEvent histev;
++EXTERN EditLine *edit INIT(NULL);
++EXTERN History  *hist;
++EXTERN HistEvent histev;
+ #endif
+ 
+ /* "Condition code" -- false (0) or true (1) */
