From 8215cb491becdd8df95412cde556ae80169ccdf3 Mon Sep 17 00:00:00 2001 From: James Hilliard Date: Tue, 19 May 2026 17:31:21 -0600 Subject: [PATCH] package/shadowsocks-libev: fix missing const MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: https://autobuild.buildroot.org/results/f1a/f1a83cce6216135a96611cc4e4eaa5766ebd730c output/build/shadowsocks-libev-v3.3.6/src/netutils.c:278:28: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 278 | char *next_dot = strchr(label, '.'); Signed-off-by: James Hilliard Signed-off-by: Arnout Vandecappelle --- .../0001-Fix-build-with-gcc13.patch | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 package/shadowsocks-libev/0001-Fix-build-with-gcc13.patch diff --git a/package/shadowsocks-libev/0001-Fix-build-with-gcc13.patch b/package/shadowsocks-libev/0001-Fix-build-with-gcc13.patch new file mode 100644 index 0000000000..6bae81434a --- /dev/null +++ b/package/shadowsocks-libev/0001-Fix-build-with-gcc13.patch @@ -0,0 +1,41 @@ +From 59a6aca7597c46cd1d079631d3061d952fbd0d6e Mon Sep 17 00:00:00 2001 +From: Hillwood Yang +Date: Tue, 5 May 2026 14:39:10 +0800 +Subject: [PATCH] Fix build with gcc13 + +Signed-off-by: James Hilliard +Upstream: https://github.com/shadowsocks/shadowsocks-libev/pull/3038 +--- + src/acl.c | 2 +- + src/netutils.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/acl.c b/src/acl.c +index 1efc1aa..c77bbd7 100644 +--- a/src/acl.c ++++ b/src/acl.c +@@ -57,7 +57,7 @@ static void + parse_addr_cidr(const char *str, char *host, int *cidr) + { + int ret = -1; +- char *pch; ++ const char *pch; + + pch = strchr(str, '/'); + while (pch != NULL) { +diff --git a/src/netutils.c b/src/netutils.c +index 8c7329a..35b2dc1 100644 +--- a/src/netutils.c ++++ b/src/netutils.c +@@ -275,7 +275,7 @@ validate_hostname(const char *hostname, const int hostname_len) + const char *label = hostname; + while (label < hostname + hostname_len) { + size_t label_len = hostname_len - (label - hostname); +- char *next_dot = strchr(label, '.'); ++ const char *next_dot = strchr(label, '.'); + if (next_dot != NULL) + label_len = next_dot - label; + +-- +2.53.0 +