Move the global variable to on main c file. ok ?
Index: Makefile =================================================================== RCS file: /cvs/OpenBSD/ports/net/tcl-snmptools/Makefile,v retrieving revision 1.7 diff -u -p -u -r1.7 Makefile --- Makefile 12 Jul 2019 21:15:35 -0000 1.7 +++ Makefile 2 Feb 2021 06:51:44 -0000 @@ -5,7 +5,7 @@ COMMENT = Tcl package that provides SNMP V = 1.0 DISTNAME = tcl-snmptools-${V} -REVISION = 1 +REVISION = 2 CATEGORIES = net MAINTAINER = Matthieu Herrb <matth...@openbsd.org> Index: patches/patch-generic_snmptools_c =================================================================== RCS file: patches/patch-generic_snmptools_c diff -N patches/patch-generic_snmptools_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-generic_snmptools_c 2 Feb 2021 06:50:04 -0000 @@ -0,0 +1,16 @@ +$OpenBSD$ + +Fix for -fno-common + +Index: generic/snmptools.c +--- generic/snmptools.c.orig ++++ generic/snmptools.c +@@ -39,6 +39,8 @@ static int snmpCmd(ClientData clientData, Tcl_Interp * + + static int sessionCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); + ++Tcl_DString Result; ++ + /* + * Function Bodies + */ Index: patches/patch-generic_util_h =================================================================== RCS file: patches/patch-generic_util_h diff -N patches/patch-generic_util_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-generic_util_h 2 Feb 2021 06:50:38 -0000 @@ -0,0 +1,14 @@ +$OpenBSD$ + +fix for -fno-common + +--- generic/util.h.orig Tue Jan 29 10:09:38 2008 ++++ generic/util.h Tue Feb 2 07:43:51 2021 +@@ -48,7 +48,6 @@ + # define TMP "/tmp" + #endif + +-Tcl_DString Result; + extern Tcl_DString Result; + + int printres(const char *fmt, ...); -- Matthieu Herrb