diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-07 00:51:58 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-07 00:51:58 +0000 |
commit | 337c6bfd4e5508ee4d3a423cd3a8330629791016 (patch) | |
tree | f60cbf5dd36d3b2ca115a5e021d3a53fc7f53868 | |
parent | 526776cf6ba5d6370ef28c9b483141fb0e4b1ae6 (diff) | |
download | chromium_src-337c6bfd4e5508ee4d3a423cd3a8330629791016.zip chromium_src-337c6bfd4e5508ee4d3a423cd3a8330629791016.tar.gz chromium_src-337c6bfd4e5508ee4d3a423cd3a8330629791016.tar.bz2 |
Mac + Linux build fix:
Linux: GCC warning appeared only in opt mode
Mac: CMSG macros appear to be non-constant somehow.
Bodge and fix later.
Review URL: http://codereview.chromium.org/21157
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9370 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/common/ipc_channel_posix.cc | 2 | ||||
-rw-r--r-- | chrome/common/ipc_channel_posix.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/chrome/common/ipc_channel_posix.cc b/chrome/common/ipc_channel_posix.cc index bc77552..fc198e6 100644 --- a/chrome/common/ipc_channel_posix.cc +++ b/chrome/common/ipc_channel_posix.cc @@ -400,7 +400,7 @@ bool Channel::ChannelImpl::ProcessIncomingMessages() { } // a pointer to an array of |num_wire_fds| file descriptors from the read - const int* wire_fds; + const int* wire_fds = NULL; unsigned num_wire_fds = 0; // walk the list of control messages and, if we find an array of file diff --git a/chrome/common/ipc_channel_posix.h b/chrome/common/ipc_channel_posix.h index 4f4e0ef..555d463 100644 --- a/chrome/common/ipc_channel_posix.h +++ b/chrome/common/ipc_channel_posix.h @@ -80,7 +80,12 @@ class Channel::ChannelImpl : public MessageLoopForIO::Watcher { }; // This is a control message buffer large enough to hold kMaxReadFDs +#if defined(OS_MACOSX) + // TODO(agl): OSX appears to have non-constant CMSG macros! + char input_cmsg_buf_[1024]; +#else char input_cmsg_buf_[CMSG_SPACE(sizeof(int) * MAX_READ_FDS)]; +#endif // Large messages that span multiple pipe buffers, get built-up using // this buffer. |