diff --git a/network.h b/network.h index a855f7de..4c0b0332 100644 --- a/network.h +++ b/network.h @@ -346,7 +346,7 @@ void sk_free_peer_info(SocketPeerInfo *pi); * can just return 0 - this function is not required to handle * numeric port specifications. */ -int net_service_lookup(char *service); +int net_service_lookup(const char *service); /* * Look up the local hostname; return value needs freeing. diff --git a/unix/network.c b/unix/network.c index fe0bc70b..0f15796b 100644 --- a/unix/network.c +++ b/unix/network.c @@ -1599,7 +1599,7 @@ static void uxsel_tell(NetSocket *s) uxsel_set(s->s, rwx, net_select_result); } -int net_service_lookup(char *service) +int net_service_lookup(const char *service) { struct servent *se; se = getservbyname(service, NULL); diff --git a/windows/network.c b/windows/network.c index a1a74b4c..58efb766 100644 --- a/windows/network.c +++ b/windows/network.c @@ -1809,7 +1809,7 @@ bool socket_writable(SOCKET skt) return false; } -int net_service_lookup(char *service) +int net_service_lookup(const char *service) { struct servent *se; se = p_getservbyname(service, NULL);