openbsd-ports/www/chromium/patches/patch-ipc_ipc_channel_posix_cc

30 lines
1.1 KiB
Plaintext

$OpenBSD: patch-ipc_ipc_channel_posix_cc,v 1.4 2011/08/16 08:17:44 robert Exp $
--- ipc/ipc_channel_posix.cc.orig Wed Jul 27 10:01:28 2011
+++ ipc/ipc_channel_posix.cc Tue Aug 2 20:12:18 2011
@@ -10,6 +10,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
+#include <sys/uio.h>
#include <sys/un.h>
#include <string>
@@ -272,7 +273,7 @@ bool CreateClientUnixDomainSocket(const std::string& p
}
bool SocketWriteErrorIsRecoverable() {
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) || defined(OS_OPENBSD)
// On OS X if sendmsg() is trying to send fds between processes and there
// isn't enough room in the output buffer to send the fd structure over
// atomically then EMSGSIZE is returned.
@@ -926,7 +927,7 @@ bool Channel::ChannelImpl::HasAcceptedConnection() con
bool Channel::ChannelImpl::GetClientEuid(uid_t* client_euid) const {
DCHECK(HasAcceptedConnection());
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) || defined(OS_OPENBSD)
uid_t peer_euid;
gid_t peer_gid;
if (getpeereid(pipe_, &peer_euid, &peer_gid) != 0) {