From 578ce006236113b38caa3aec524b7bb1759e4aef Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 29 Jan 2025 06:30:16 +0100 Subject: Fix security warning when calling getsockname/getpeername MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make sure we define our socket name length with the correct type a socklen_t. Should fix this sort of error: ../common/spio.c:124:45: error: passing argument 3 of ‘getsockname’ from incompatible pointer type [-Wincompatible-pointer-types] --- common/sock_any.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/sock_any.h') diff --git a/common/sock_any.h b/common/sock_any.h index 77c3841..ce88d30 100644 --- a/common/sock_any.h +++ b/common/sock_any.h @@ -57,7 +57,7 @@ struct sockaddr_any struct sockaddr_in6 in6; #endif } s; - size_t namelen; + socklen_t namelen; }; #define SANY_ADDR(any) ((any).s.a) -- cgit v1.2.3