diff options
author | François Andriot <francois.andriot@free.fr> | 2014-10-08 21:24:13 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2014-10-08 21:24:13 +0200 |
commit | 3adf509ac83ac9d807de0bbed0770d0234382c84 (patch) | |
tree | 5b13ae15e867c03af7c5dd1e51cc86aff289a03a | |
parent | 58c3aed2bb340467aa9734a9141ebe1d89e4074b (diff) | |
download | tdelibs-3adf509ac83ac9d807de0bbed0770d0234382c84.tar.gz tdelibs-3adf509ac83ac9d807de0bbed0770d0234382c84.zip |
Fix ucred support in openbsd
-rw-r--r-- | dcop/dcopclient.cpp | 4 |
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; |