summaryrefslogtreecommitdiffstats
path: root/dcop/dcopclient.cpp
diff options
context:
space:
mode:
authorFrançois Andriot <francois.andriot@free.fr>2014-10-08 21:24:13 +0200
committerSlávek Banko <slavek.banko@axis.cz>2014-10-08 21:24:13 +0200
commit3adf509ac83ac9d807de0bbed0770d0234382c84 (patch)
tree5b13ae15e867c03af7c5dd1e51cc86aff289a03a /dcop/dcopclient.cpp
parent58c3aed2bb340467aa9734a9141ebe1d89e4074b (diff)
downloadtdelibs-3adf509ac83ac9d807de0bbed0770d0234382c84.tar.gz
tdelibs-3adf509ac83ac9d807de0bbed0770d0234382c84.zip
Fix ucred support in openbsd
Diffstat (limited to 'dcop/dcopclient.cpp')
-rw-r--r--dcop/dcopclient.cpp4
1 files changed, 4 insertions, 0 deletions
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;