git: 8e2796878626 - main - inet: remove tcp_debug from netinet/tcp_debug.h

From: Mateusz Guzik <mjg_at_FreeBSD.org>
Date: Mon, 01 Nov 2021 23:11:43 UTC
The branch main has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=8e2796878626ccc2fc15e4911a16af8a9fa7819a

commit 8e2796878626ccc2fc15e4911a16af8a9fa7819a
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2021-11-01 21:28:54 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2021-11-01 23:10:30 +0000

    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")
---
 sys/netinet/tcp_debug.h | 6 ------
 usr.sbin/trpt/trpt.c    | 3 +++
 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