Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: Fwd: nsh needs to adapt to mbuf.h changes
To:
Tom Smyth <tom.smyth@wirelessconnect.eu>, ports <ports@openbsd.org>
Date:
Wed, 25 Jun 2025 10:22:29 +0200

Download raw body.

Thread
On Wed, Jun 25, 2025 at 01:14:32AM +0100, Stuart Henderson wrote:
> quick heads-up, this change in base needs nsh to catch up. I didn't
> check but I assume the existing code is going to be similar enough to
> what's in usr.bin/netstat/mbuf.c that it should be easy to adapt.

Fixed in the upstream repository.

Doesn't seem likely that there will be a new upstream release quickly.
Meanwhile, should we pull this patch into the port to unbreak the build?

diff /usr/ports
path + /usr/ports
commit - d02edc16732fe58459d6bdb0ee35f0d411ff6ef4
blob - f052a5b6babdaf3c4fc57b8a0bb83a27aab8999a
file + shells/nsh/Makefile
--- shells/nsh/Makefile
+++ shells/nsh/Makefile
@@ -3,6 +3,7 @@ COMMENT =	network switch style shell
 CATEGORIES =	shells net
 HOMEPAGE =	https://www.nmedia.net/nsh/
 V =		1.2.3
+REVISION =	0
 DISTNAME =	nsh-${V}
 SITES =		https://github.com/yellowman/nsh/releases/download/v${V}/
 
commit - 7db89bf3c7093b6e1fb14b841309049d1c487b96
blob - /dev/null
file + shells/nsh/patches/patch-stats_c (mode 644)
--- /dev/null
+++ shells/nsh/patches/patch-stats_c
@@ -0,0 +1,15 @@
+fix 'show kernel mbuf' command on -current after mbuf.h,v r1.266
+
+from upstream
+Index: stats.c
+--- stats.c.orig
++++ stats.c
+@@ -782,7 +782,7 @@ mbpr(void)
+ 
+ 	memset(&seen, 0, sizeof(seen));
+ 
+-	 if (nmbtypes != MBSTAT_COUNT) {
++	 if (nmbtypes != MT_NTYPES) {
+ 		printf("%% mbpr: unexpected change to mbstat; check source\n");
+ 		return;
+ 	}