diff options
author | Stef Walter <stef@thewalter.net> | 2025-01-29 06:30:16 +0100 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2025-01-29 06:30:16 +0100 |
commit | 578ce006236113b38caa3aec524b7bb1759e4aef (patch) | |
tree | bba65e2cde8a2b71bdf7bef7230ed09b555d806d | |
parent | 7f2b835dd5db4dcfdbe88e238c89084785724925 (diff) |
Fix security warning when calling getsockname/getpeername
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]
-rw-r--r-- | common/sock_any.h | 2 |
1 files changed, 1 insertions, 1 deletions
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) |