mirror of
https://github.com/tmux/tmux.git
synced 2026-10-09 19:54:22 +00:00
Merge pull request #5481 from r1w1s1/fix-getpeereid-socklen
compat: use socklen_t for getsockopt length
This commit is contained in:
@@ -31,7 +31,7 @@ getpeereid(int s, uid_t *uid, gid_t *gid)
|
|||||||
{
|
{
|
||||||
#ifdef HAVE_SO_PEERCRED
|
#ifdef HAVE_SO_PEERCRED
|
||||||
struct ucred uc;
|
struct ucred uc;
|
||||||
int len = sizeof uc;
|
socklen_t len = sizeof uc;
|
||||||
|
|
||||||
if (getsockopt(s, SOL_SOCKET, SO_PEERCRED, &uc, &len) == -1)
|
if (getsockopt(s, SOL_SOCKET, SO_PEERCRED, &uc, &len) == -1)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|||||||
Reference in New Issue
Block a user