Fix build with "-fno-common"

From FreeBSD via David Goerger < david at goerger dot info > who kindly
submitted the patch to what appears to be the new upstream on gitlab.

See https://marc.info/?l=mlmmj&m=161122707912991&w=2 for a discussion about
upstream.
This commit is contained in:
kn 2021-02-14 13:23:56 +00:00
parent 9d5c832095
commit b073f3a100
2 changed files with 28 additions and 1 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.22 2021/02/14 12:47:19 kn Exp $
# $OpenBSD: Makefile,v 1.23 2021/02/14 13:23:56 kn Exp $
COMMENT= mailing list manager
DISTNAME= mlmmj-1.3.0
REVISION= 0
CATEGORIES= mail
HOMEPAGE= http://mlmmj.org/

View File

@ -0,0 +1,26 @@
$OpenBSD: patch-include_mlmmj_h,v 1.1 2021/02/14 13:23:56 kn Exp $
Fix build with "-fno-common", from FreeBSD.
https://gitlab.com/mlmmj/mlmmj/-/merge_requests/2
Index: include/mlmmj.h
--- include/mlmmj.h.orig
+++ include/mlmmj.h
@@ -81,7 +81,7 @@ enum subtype {
SUB_NONE /* For when an address is not subscribed at all */
};
-char *subtype_strs[7]; /* count matches enum above; defined in subscriberfuncs.c */
+extern char *subtype_strs[7]; /* count matches enum above; defined in subscriberfuncs.c */
enum subreason {
SUB_REQUEST,
@@ -92,7 +92,7 @@ enum subreason {
SUB_SWITCH
};
-char * subreason_strs[6]; /* count matches enum above; defined in subscriberfuncs.c */
+extern char * subreason_strs[6]; /* count matches enum above; defined in subscriberfuncs.c */
void print_version(const char *prg);