diff --git a/package/odhcp6c/0001-odhcp6c-const-cast-for-c23-compatibility.patch b/package/odhcp6c/0001-odhcp6c-const-cast-for-c23-compatibility.patch new file mode 100644 index 0000000000..cdb26a7434 --- /dev/null +++ b/package/odhcp6c/0001-odhcp6c-const-cast-for-c23-compatibility.patch @@ -0,0 +1,102 @@ +From 3b69378125aba61b3391bf5fe607983ce75b839c Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Wed, 8 Apr 2026 14:14:56 -0700 +Subject: [PATCH] odhcp6c: const cast for c23 compatibility + +strpbrk is now a macro that returns const based on the parameter. Cast +it away when we don't want const. + +Signed-off-by: Rosen Penev + +Upstream: https://github.com/openwrt/odhcp6c/pull/156 + +Signed-off-by: Bernd Kuhls +--- + src/config.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/src/config.c b/src/config.c +index 54e2d35..c1a3a99 100644 +--- a/src/config.c ++++ b/src/config.c +@@ -338,7 +338,7 @@ static int config_parse_opt_u8(const char *src, uint8_t **dst) + static int config_parse_opt_string(const char *src, uint8_t **dst, const bool array) + { + int o_len = 0; +- char *sep = strpbrk(src, ARRAY_SEP); ++ char *sep = strpbrk((char*)src, ARRAY_SEP); + + if (sep && !array) + return -1; +@@ -362,7 +362,7 @@ static int config_parse_opt_string(const char *src, uint8_t **dst, const bool ar + src = sep; + + if (sep) +- sep = strpbrk(src, ARRAY_SEP); ++ sep = strpbrk((char*)src, ARRAY_SEP); + } while (src); + + return o_len; +@@ -371,7 +371,7 @@ static int config_parse_opt_string(const char *src, uint8_t **dst, const bool ar + static int config_parse_opt_dns_string(const char *src, uint8_t **dst, const bool array) + { + int o_len = 0; +- char *sep = strpbrk(src, ARRAY_SEP); ++ char *sep = strpbrk((char*)src, ARRAY_SEP); + + if (sep && !array) + return -1; +@@ -399,7 +399,7 @@ static int config_parse_opt_dns_string(const char *src, uint8_t **dst, const boo + src = sep; + + if (sep) +- sep = strpbrk(src, ARRAY_SEP); ++ sep = strpbrk((char*)src, ARRAY_SEP); + } while (src); + + return o_len; +@@ -408,7 +408,7 @@ static int config_parse_opt_dns_string(const char *src, uint8_t **dst, const boo + static int config_parse_opt_ip6(const char *src, uint8_t **dst, const bool array) + { + int o_len = 0; +- char *sep = strpbrk(src, ARRAY_SEP); ++ char *sep = strpbrk((char*)src, ARRAY_SEP); + + if (sep && !array) + return -1; +@@ -433,7 +433,7 @@ static int config_parse_opt_ip6(const char *src, uint8_t **dst, const bool array + src = sep; + + if (sep) +- sep = strpbrk(src, ARRAY_SEP); ++ sep = strpbrk((char*)src, ARRAY_SEP); + } while (src); + + return o_len; +@@ -442,7 +442,7 @@ static int config_parse_opt_ip6(const char *src, uint8_t **dst, const bool array + static int config_parse_opt_user_class(const char *src, uint8_t **dst, const bool array) + { + int o_len = 0; +- char *sep = strpbrk(src, ARRAY_SEP); ++ char *sep = strpbrk((char*)src, ARRAY_SEP); + + if (sep && !array) + return -1; +@@ -471,7 +471,7 @@ static int config_parse_opt_user_class(const char *src, uint8_t **dst, const boo + src = sep; + + if (sep) +- sep = strpbrk(src, ARRAY_SEP); ++ sep = strpbrk((char*)src, ARRAY_SEP); + } while (src); + + return o_len; +@@ -555,7 +555,7 @@ int config_parse_opt(const char *opt) + struct odhcp6c_opt *dopt = NULL; + int ret = -1; + +- data = strpbrk(opt, ":"); ++ data = strpbrk((char*)opt, ":"); + if (!data) + return -1; +