Problem: build broken on kFreeBSD

Solution: fix refactor mistake introduced by:

091df743a81f3899bd70166060c2082ea0cbd57c

Fixes https://github.com/zeromq/libzmq/issues/4113
This commit is contained in:
Luca Boccassi 2021-01-03 21:43:05 +00:00 committed by Luca Boccassi
parent 2998ff34aa
commit 2bf998f7e0

View File

@ -84,7 +84,7 @@ static std::string get_peer_address (zmq::fd_t s_)
else if (family == PF_UNIX) {
struct xucred cred;
socklen_t size = sizeof (cred);
if (!getsockopt (_s, 0, LOCAL_PEERCRED, &cred, &size)
if (!getsockopt (s_, 0, LOCAL_PEERCRED, &cred, &size)
&& cred.cr_version == XUCRED_VERSION) {
std::ostringstream buf;
buf << ":" << cred.cr_uid << ":";