From 37e13bd9ee13e7e9e55eb78f2a1c83686b2bb0c9 Mon Sep 17 00:00:00 2001 From: mortimer Date: Mon, 18 Jan 2021 00:49:10 +0000 Subject: Move defiition of sum variable from header file to avoid issues with -fno-common ok deraadt@ --- usr.bin/systat/if.c | 4 +++- usr.bin/systat/systat.h | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/systat/if.c b/usr.bin/systat/if.c index 4f6ef53ce4a..649ad255756 100644 --- a/usr.bin/systat/if.c +++ b/usr.bin/systat/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.25 2019/07/04 01:39:44 dlg Exp $ */ +/* $OpenBSD: if.c,v 1.26 2021/01/18 00:49:09 mortimer Exp $ */ /* * Copyright (c) 2004 Markus Friedl * @@ -42,6 +42,8 @@ struct ifstat { char ifs_flag; } *ifstats; +struct ifcount sum; + static int nifs = 0; static int num_ifs = 0; static int show_bits = 0; diff --git a/usr.bin/systat/systat.h b/usr.bin/systat/systat.h index dde7381545c..e7d20070541 100644 --- a/usr.bin/systat/systat.h +++ b/usr.bin/systat/systat.h @@ -1,4 +1,4 @@ -/* $OpenBSD: systat.h,v 1.23 2019/03/04 21:27:35 dlg Exp $ */ +/* $OpenBSD: systat.h,v 1.24 2021/01/18 00:49:09 mortimer Exp $ */ /* $NetBSD: systat.h,v 1.2 1995/01/20 08:52:14 jtc Exp $ */ /*- @@ -112,4 +112,5 @@ struct ifcount { u_int64_t ifc_co; /* collisions */ int ifc_flags; /* up / down */ int ifc_state; /* link state */ -} sum; +}; +extern struct ifcount sum; -- cgit v1.2.3