mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-09 17:03:35 -09:00
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 <james.hilliard1@gmail.com> Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
42 lines
1.2 KiB
Diff
42 lines
1.2 KiB
Diff
From 59a6aca7597c46cd1d079631d3061d952fbd0d6e Mon Sep 17 00:00:00 2001
|
|
From: Hillwood Yang <hillwood@opensuse.org>
|
|
Date: Tue, 5 May 2026 14:39:10 +0800
|
|
Subject: [PATCH] Fix build with gcc13
|
|
|
|
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
|
|
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
|
|
|