diff options
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/DEPS | 4 | ||||
-rw-r--r-- | ipc/ipc_channel_nacl.cc | 16 |
2 files changed, 14 insertions, 6 deletions
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 <errno.h> #include <stddef.h> -#include <sys/nacl_imc_api.h> -#include <sys/nacl_syscalls.h> #include <sys/types.h> #include <algorithm> @@ -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<void*>(msg->data()), msg->size() }; - NaClImcMsgHdr msgh = { &iov, 1, fds, num_fds }; + NaClAbiNaClImcMsgIoVec iov = { + const_cast<void*>(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. |