mlvpn: fix -fno-common, from upstream

This commit is contained in:
sthen 2021-02-01 19:54:19 +00:00
parent 81c92caece
commit 5963b49178
3 changed files with 54 additions and 1 deletions

View File

@ -1,9 +1,10 @@
# $OpenBSD: Makefile,v 1.10 2020/03/30 13:19:06 sthen Exp $
# $OpenBSD: Makefile,v 1.11 2021/02/01 19:54:19 sthen Exp $
COMMENT = link-aggregation VPN software
V = 2.3.5
DISTNAME = mlvpn-$V
REVISION = 0
CATEGORIES = net

View File

@ -0,0 +1,31 @@
$OpenBSD: patch-src_mlvpn_c,v 1.1 2021/02/01 19:54:19 sthen Exp $
From 58418fd847fe833d1e626d4b7d08f0e623756c5c Mon Sep 17 00:00:00 2001
From: Laurent Coustet <ed@zehome.com>
Date: Tue, 1 Sep 2020 18:48:19 +0200
Subject: [PATCH] Fix GCC 10 compilation issue
Index: src/mlvpn.c
--- src/mlvpn.c.orig
+++ src/mlvpn.c
@@ -82,6 +82,7 @@ static char **saved_argv;
struct ev_loop *loop;
static ev_timer reorder_drain_timeout;
static ev_timer reorder_adjust_rtt_timeout;
+struct rtunhead rtuns;
char *status_command = NULL;
char *process_title = NULL;
int logdebug = 0;
@@ -1491,11 +1492,11 @@ main(int argc, char **argv)
mlvpn_systemd_notify();
#endif
+ LIST_INIT(&rtuns);
priv_init(argv, mlvpn_options.unpriv_user);
if (mlvpn_options.change_process_title)
update_process_title();
- LIST_INIT(&rtuns);
freebuf = mlvpn_freebuffer_init(512);
/* Kill me if my root process dies ! */

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-src_mlvpn_h,v 1.1 2021/02/01 19:54:19 sthen Exp $
From 58418fd847fe833d1e626d4b7d08f0e623756c5c Mon Sep 17 00:00:00 2001
From: Laurent Coustet <ed@zehome.com>
Date: Tue, 1 Sep 2020 18:48:19 +0200
Subject: [PATCH] Fix GCC 10 compilation issue
Index: src/mlvpn.h
--- src/mlvpn.h.orig
+++ src/mlvpn.h
@@ -130,7 +130,9 @@ enum chap_status {
MLVPN_LOSSY
};
-LIST_HEAD(rtunhead, mlvpn_tunnel_s) rtuns;
+LIST_HEAD(rtunhead, mlvpn_tunnel_s);
+
+extern struct rtunhead rtuns;
typedef struct mlvpn_tunnel_s
{