commit:     492d6119594d1774685fcd4f40fb5d754c3d77c4
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 14 10:08:56 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Jun 14 10:09:40 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=492d6119

net-firewall/pglinux: Fix building with CFLAGS=-fno-common

Package-Manager: Portage-2.3.100, Repoman-2.3.22
Closes: https://bugs.gentoo.org/show_bug.cgi?id=707944
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 .../files/pglinux-2.3.1_p20171006-fno-common.patch  | 21 +++++++++++++++++++++
 net-firewall/pglinux/pglinux-2.3.1_p20171006.ebuild |  5 ++++-
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git 
a/net-firewall/pglinux/files/pglinux-2.3.1_p20171006-fno-common.patch 
b/net-firewall/pglinux/files/pglinux-2.3.1_p20171006-fno-common.patch
new file mode 100644
index 00000000000..d6c80405e86
--- /dev/null
+++ b/net-firewall/pglinux/files/pglinux-2.3.1_p20171006-fno-common.patch
@@ -0,0 +1,21 @@
+--- a/pgld/src/blocklist.h
++++ b/pgld/src/blocklist.h
+@@ -74,6 +74,6 @@
+ void blocklist_stats(int clearhits);
+ block_entry_t * blocklist_find(uint32_t ip);
+ void blocklist_dump();
+-blocklist_t blocklist;
++extern blocklist_t blocklist;
+ 
+ #endif /* INC_BLOCKLIST_H */
+--- a/pgld/src/blocklist.c
++++ b/pgld/src/blocklist.c
+@@ -22,6 +22,8 @@
+ #include "blocklist.h"
+ #include "pgld.h"
+ 
++blocklist_t blocklist;
++
+ void blocklist_init() {
+     blocklist.entries = NULL;
+     blocklist.count = 0;

diff --git a/net-firewall/pglinux/pglinux-2.3.1_p20171006.ebuild 
b/net-firewall/pglinux/pglinux-2.3.1_p20171006.ebuild
index 8f0826099c3..eafaafe2ee8 100644
--- a/net-firewall/pglinux/pglinux-2.3.1_p20171006.ebuild
+++ b/net-firewall/pglinux/pglinux-2.3.1_p20171006.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -58,6 +58,9 @@ CONFIG_CHECK="~NETFILTER_NETLINK
        ~IP_NF_IPTABLES
        ~IP_NF_TARGET_REJECT"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-fno-common.patch
+)
 S="${WORKDIR}/${MY_PN}-code-${COMMIT}"
 
 src_prepare() {

Reply via email to