blob: 6bae81434a636f61ab61fb87c7968cd4c89ab5f8 [file] [edit]
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