0

OpenBSD patch for ipc, split from CR

Include <sys/uio.h> on OpenBSD and share the getpeerid code
with Mac.

Patch by Robert Nagy <robert@openbsd.org>

BUG=
TEST=
Review URL: http://codereview.chromium.org/8330025

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106080 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
mark@chromium.org
2011-10-18 17:46:22 +00:00
parent 80c82b7868
commit 4af5ef4a92

@ -12,6 +12,10 @@
#include <sys/stat.h>
#include <sys/un.h>
#if defined(OS_OPENBSD)
#include <sys/uio.h>
#endif
#include <string>
#include <map>
@ -944,7 +948,7 @@ bool Channel::ChannelImpl::HasAcceptedConnection() const {
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) {