aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2021-11-01 21:28:54 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2021-11-01 23:10:30 +0000
commit8e2796878626ccc2fc15e4911a16af8a9fa7819a (patch)
treee49e1889a0623a97d3b1a0011eaec80479afbcf5
parent8f3d786cb301c49dec189bad80cdc163dd3ca1d7 (diff)
downloadsrc-8e2796878626ccc2fc15e4911a16af8a9fa7819a.tar.gz
src-8e2796878626ccc2fc15e4911a16af8a9fa7819a.zip
inet: remove tcp_debug from netinet/tcp_debug.h
It was a hack only needed for trpt, which can just define it locally. This makes it possible to fix up systat which also includes the file. Sponsored by: Rubicon Communications, LLC ("Netgate")
-rw-r--r--sys/netinet/tcp_debug.h6
-rw-r--r--usr.sbin/trpt/trpt.c3
2 files changed, 3 insertions, 6 deletions
diff --git a/sys/netinet/tcp_debug.h b/sys/netinet/tcp_debug.h
index c44930724b66..0b3c895e9909 100644
--- a/sys/netinet/tcp_debug.h
+++ b/sys/netinet/tcp_debug.h
@@ -73,10 +73,4 @@ static const char *tanames[] =
#define TCP_NDEBUG 100
-#ifndef _KERNEL
-/* XXX common variables for broken applications. */
-struct tcp_debug tcp_debug[TCP_NDEBUG];
-int tcp_debx;
-#endif
-
#endif /* !_NETINET_TCP_DEBUG_H_ */
diff --git a/usr.sbin/trpt/trpt.c b/usr.sbin/trpt/trpt.c
index e8198f7d080e..59727cadaaba 100644
--- a/usr.sbin/trpt/trpt.c
+++ b/usr.sbin/trpt/trpt.c
@@ -85,6 +85,9 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <unistd.h>
+static struct tcp_debug tcp_debug[TCP_NDEBUG];
+static int tcp_debx;
+
static struct nlist nl[3];
#define N_TCP_DEBUG 0
#define N_TCP_DEBX 1