From 22ee40576b0692c83f8b470415ea2f64a45b7b34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20E=C3=9Fer?= Date: Tue, 22 Sep 2020 12:57:15 +0000 Subject: [PATCH] Fix build with -fno-common --- devel/libtuntap/Makefile | 4 ++-- devel/libtuntap/files/patch-private.h | 11 +++++++++++ devel/libtuntap/files/patch-tuntap.c | 11 +++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 devel/libtuntap/files/patch-private.h create mode 100644 devel/libtuntap/files/patch-tuntap.c diff --git a/devel/libtuntap/Makefile b/devel/libtuntap/Makefile index 8aa53f033de8..64580c817f45 100644 --- a/devel/libtuntap/Makefile +++ b/devel/libtuntap/Makefile @@ -2,9 +2,9 @@ # $FreeBSD$ PORTNAME= libtuntap -DISTVERSION= 0.4 -PORTREVISION= 1 DISTVERSIONPREFIX= ${PORTNAME}- +DISTVERSION= 0.4 +PORTREVISION= 2 CATEGORIES= devel net MAINTAINER= mmokhi@FreeBSD.org diff --git a/devel/libtuntap/files/patch-private.h b/devel/libtuntap/files/patch-private.h new file mode 100644 index 000000000000..99bf192061e4 --- /dev/null +++ b/devel/libtuntap/files/patch-private.h @@ -0,0 +1,11 @@ +--- private.h.orig 2018-10-15 10:45:27 UTC ++++ private.h +@@ -105,7 +105,7 @@ struct device { + # endif + + /* Internal log facilities */ +-t_tuntap_log tuntap_log; ++extern t_tuntap_log tuntap_log; + void tuntap_log_default(int, const char *); + void tuntap_log_hexdump(void *, size_t); + void tuntap_log_chksum(void *, int); diff --git a/devel/libtuntap/files/patch-tuntap.c b/devel/libtuntap/files/patch-tuntap.c new file mode 100644 index 000000000000..b5f22129c0d3 --- /dev/null +++ b/devel/libtuntap/files/patch-tuntap.c @@ -0,0 +1,11 @@ +--- tuntap.c.orig 2018-10-15 10:45:27 UTC ++++ tuntap.c +@@ -33,6 +33,8 @@ + #include "tuntap.h" + #include "private.h" + ++t_tuntap_log tuntap_log; ++ + struct device * + tuntap_init(void) { + struct device *dev = NULL;