| Index: ipc/ipc_channel_nacl.cc
|
| diff --git a/ipc/ipc_channel_nacl.cc b/ipc/ipc_channel_nacl.cc
|
| index 805e90614bdd86cfc750bc1556037ccdc517fff8..6213d41412db3d6d11b7577b8f5b6104f9d2a00a 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.
|
|
|