From 2bf998f7e0aa19e89918627d386d526e4f2e25dd Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sun, 3 Jan 2021 21:43:05 +0000 Subject: [PATCH] Problem: build broken on kFreeBSD Solution: fix refactor mistake introduced by: 091df743a81f3899bd70166060c2082ea0cbd57c Fixes https://github.com/zeromq/libzmq/issues/4113 --- src/stream_engine_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stream_engine_base.cpp b/src/stream_engine_base.cpp index 9b9563a9..791f1bda 100644 --- a/src/stream_engine_base.cpp +++ b/src/stream_engine_base.cpp @@ -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 << ":";