nlbwmon: add pending PR to fix GCC16 builds
authorJohn Audia <redacted>
Fri, 22 May 2026 17:37:26 +0000 (13:37 -0400)
committerJosef Schlehofer <redacted>
Wed, 27 May 2026 09:43:56 +0000 (11:43 +0200)
Add pending https://github.com/jow-/nlbwmon/pull/75

This is needed for: https://github.com/openwrt/openwrt/pull/23194

Signed-off-by: John Audia <redacted>
net/nlbwmon/Makefile
net/nlbwmon/patches/020-fix-discarded-qualifiers-warning-with-GCC-16.patch [new file with mode: 0644]

index 1e03a23a54342b64466419872a20da7e183b1c1f..bcc17bfe370da7990349ce781c61e8c4b87b4e5b 100644 (file)
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nlbwmon
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/jow-/nlbwmon.git
diff --git a/net/nlbwmon/patches/020-fix-discarded-qualifiers-warning-with-GCC-16.patch b/net/nlbwmon/patches/020-fix-discarded-qualifiers-warning-with-GCC-16.patch
new file mode 100644 (file)
index 0000000..65034de
--- /dev/null
@@ -0,0 +1,25 @@
+From 7af6798a218737db7efc46dd4b9ae74b4c6a48f8 Mon Sep 17 00:00:00 2001
+From: John Audia <therealgraysky@proton.me>
+Date: Tue, 26 May 2026 09:22:30 -0400
+Subject: [PATCH] fix discarded-qualifiers warning with GCC 16
+
+strchr() returns char * even when passed a const char *, a known
+C standard wart. Explicitly cast the return value to char * to
+satisfy -Werror=discarded-qualifiers
+
+Signed-off-by: John Audia <therealgraysky@proton.me>
+---
+ subnets.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/subnets.c
++++ b/subnets.c
+@@ -36,7 +36,7 @@ parse_subnet(const char *addr, struct su
+       unsigned long int n;
+       uint8_t i, b;
+-      mask = strchr(addr, '/');
++      mask = (char *)strchr(addr, '/');
+       if (mask)
+               memcpy(tmp, addr, mask++ - addr);
git clone https://git.99rst.org/PROJECT