commit:     4a295fd356b468d49f7b4e611b0d9d116f32b0f4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May 17 00:39:12 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 17 00:39:12 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a295fd3

net-analyzer/vnstat: fix 1.17 with GCC 10

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-analyzer/vnstat/vnstat-1.17-r1.ebuild | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/net-analyzer/vnstat/vnstat-1.17-r1.ebuild 
b/net-analyzer/vnstat/vnstat-1.17-r1.ebuild
index fceff0f93ca..8aa25d8a327 100644
--- a/net-analyzer/vnstat/vnstat-1.17-r1.ebuild
+++ b/net-analyzer/vnstat/vnstat-1.17-r1.ebuild
@@ -4,7 +4,7 @@
 EAPI=7
 
 VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/teemutoivola.asc
-inherit toolchain-funcs verify-sig
+inherit flag-o-matic toolchain-funcs verify-sig
 
 DESCRIPTION="Console-based network traffic monitor that keeps statistics of 
network usage"
 HOMEPAGE="https://humdi.net/vnstat/";
@@ -43,6 +43,15 @@ src_prepare() {
                src/common.h || die
 }
 
+src_configure() {
+       tc-export CC
+
+       # Fails to build with GCC 10
+       append-flags -fcommon
+
+       default
+}
+
 src_compile() {
        emake ${PN} ${PN}d $(usex gd ${PN}i '')
 }

Reply via email to