ports/devel/capnproto/files/patch-src__kj__async-io-unix.c++
Maxim Sobolev b346f732e4 devel/capnproto: upgrade to 0.9.0
ChangeLog: https://capnproto.org/news/

PR:	257919
Reported by:	sobomax@FreeBSD.org
Approved by:	felix@userspace.com.au (maintainer)
2021-08-23 18:18:22 +02:00

14 lines
557 B
C++

--- src/kj/async-io-unix.c++.orig 2021-08-14 23:27:30 UTC
+++ src/kj/async-io-unix.c++
@@ -1486,7 +1486,11 @@ kj::Own<PeerIdentity> SocketAddress::getIdentity(kj::L
// MacOS / FreeBSD
struct xucred creds;
uint length = sizeof(creds);
+#if defined SOL_LOCAL
stream.getsockopt(SOL_LOCAL, LOCAL_PEERCRED, &creds, &length);
+#else
+ stream.getsockopt(0, LOCAL_PEERCRED, &creds, &length);
+#endif
KJ_ASSERT(length == sizeof(creds));
if (creds.cr_uid != static_cast<uid_t>(-1)) {
result.uid = creds.cr_uid;