Merge pull request #5481 from r1w1s1/fix-getpeereid-socklen

compat: use socklen_t for getsockopt length
This commit is contained in:
Nicholas Marriott
2026-08-17 07:52:02 +01:00
committed by GitHub

View File

@@ -31,7 +31,7 @@ getpeereid(int s, uid_t *uid, gid_t *gid)
{
#ifdef HAVE_SO_PEERCRED
struct ucred uc;
int len = sizeof uc;
socklen_t len = sizeof uc;
if (getsockopt(s, SOL_SOCKET, SO_PEERCRED, &uc, &len) == -1)
return (-1);