From 3adf509ac83ac9d807de0bbed0770d0234382c84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Wed, 8 Oct 2014 21:24:13 +0200 Subject: Fix ucred support in openbsd --- dcop/dcopclient.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'dcop') diff --git a/dcop/dcopclient.cpp b/dcop/dcopclient.cpp index 92fccde82..40cfd41c8 100644 --- a/dcop/dcopclient.cpp +++ b/dcop/dcopclient.cpp @@ -717,7 +717,11 @@ bool DCOPClient::isSuspended() const // Check whether the remote end is owned by the same user. static bool peerIsUs(int sockfd) { +#if defined(__OpenBSD__) + struct sockpeercred cred; +#else struct ucred cred; +#endif socklen_t siz = sizeof(cred); if (getsockopt(sockfd, SOL_SOCKET, SO_PEERCRED, &cred, &siz) != 0) return false; -- cgit v1.2.1