From 18ff3c38542bdc3186b1a8512bdc9edef69acff0 Mon Sep 17 00:00:00 2001 From: "mcgrathr@chromium.org" Date: Wed, 5 Jun 2013 23:37:11 +0000 Subject: Use native_client/src/public/ for IMC headers The preferred way to get the header files for NaCl's IMC layer has changed. The NaClImcMsgIoVec and NaClImcMsgHdr structs now use the NaclAbi prefix. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3464 TEST= R=dmichael@chromium.org, mseaborn@chromium.org Review URL: https://chromiumcodereview.appspot.com/15793014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204359 0039d316-1c4b-4281-b951-d872f2087c98 --- ipc/DEPS | 4 ++++ ipc/ipc_channel_nacl.cc | 16 ++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 ipc/DEPS (limited to 'ipc') diff --git a/ipc/DEPS b/ipc/DEPS new file mode 100644 index 0000000..eea2192 --- /dev/null +++ b/ipc/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + # For ipc_channel_nacl.cc: + "+native_client/src/public", +] diff --git a/ipc/ipc_channel_nacl.cc b/ipc/ipc_channel_nacl.cc index 805e906..6213d41 100644 --- a/ipc/ipc_channel_nacl.cc +++ b/ipc/ipc_channel_nacl.cc @@ -6,8 +6,6 @@ #include #include -#include -#include #include #include @@ -21,6 +19,8 @@ #include "base/threading/simple_thread.h" #include "ipc/file_descriptor_set_posix.h" #include "ipc/ipc_logging.h" +#include "native_client/src/public/imc_syscalls.h" +#include "native_client/src/public/imc_types.h" namespace IPC { @@ -39,8 +39,10 @@ bool ReadDataOnReaderThread(int pipe, MessageContents* contents) { contents->data.resize(Channel::kReadBufferSize); contents->fds.resize(FileDescriptorSet::kMaxDescriptorsPerMessage); - NaClImcMsgIoVec iov = { &contents->data[0], contents->data.size() }; - NaClImcMsgHdr msg = { &iov, 1, &contents->fds[0], contents->fds.size() }; + NaClAbiNaClImcMsgIoVec iov = { &contents->data[0], contents->data.size() }; + NaClAbiNaClImcMsgHdr msg = { + &iov, 1, &contents->fds[0], contents->fds.size() + }; int bytes_read = imc_recvmsg(pipe, &msg, 0); @@ -264,8 +266,10 @@ bool Channel::ChannelImpl::ProcessOutgoingMessages() { DCHECK(num_fds <= FileDescriptorSet::kMaxDescriptorsPerMessage); msg->file_descriptor_set()->GetDescriptors(fds); - NaClImcMsgIoVec iov = { const_cast(msg->data()), msg->size() }; - NaClImcMsgHdr msgh = { &iov, 1, fds, num_fds }; + NaClAbiNaClImcMsgIoVec iov = { + const_cast(msg->data()), msg->size() + }; + NaClAbiNaClImcMsgHdr msgh = { &iov, 1, fds, num_fds }; ssize_t bytes_written = imc_sendmsg(pipe_, &msgh, 0); DCHECK(bytes_written); // The trusted side shouldn't return 0. -- cgit v1.1