OpenBSD patch for ipc, split from CR #8275005
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:
@ -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) {
|
||||
|
Reference in New Issue
Block a user