| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/edk/embedder/platform_channel_utils_posix.h" | 5 #include "mojo/edk/embedder/platform_channel_utils_posix.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <sys/socket.h> | 8 #include <sys/socket.h> |
| 9 #include <sys/uio.h> | |
| 10 #include <unistd.h> | 9 #include <unistd.h> |
| 11 | 10 |
| 12 #include "base/logging.h" | 11 #include "base/logging.h" |
| 13 #include "base/posix/eintr_wrapper.h" | 12 #include "base/posix/eintr_wrapper.h" |
| 14 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 15 | 14 |
| 15 #if !defined(OS_NACL) |
| 16 #include <sys/uio.h> |
| 17 #endif |
| 18 |
| 16 #if !defined(SO_PEEK_OFF) | 19 #if !defined(SO_PEEK_OFF) |
| 17 #define SO_PEEK_OFF 42 | 20 #define SO_PEEK_OFF 42 |
| 18 #endif | 21 #endif |
| 19 | 22 |
| 20 namespace mojo { | 23 namespace mojo { |
| 21 namespace edk { | 24 namespace edk { |
| 22 | 25 |
| 23 // On Linux, |SIGPIPE| is suppressed by passing |MSG_NOSIGNAL| to | 26 // On Linux, |SIGPIPE| is suppressed by passing |MSG_NOSIGNAL| to |
| 24 // |send()|/|sendmsg()|. (There is no way of suppressing |SIGPIPE| on | 27 // |send()|/|sendmsg()|. (There is no way of suppressing |SIGPIPE| on |
| 25 // |write()|/|writev().) On Mac, |SIGPIPE| is suppressed by setting the | 28 // |write()|/|writev().) On Mac, |SIGPIPE| is suppressed by setting the |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 DCHECK(platform_handles->back().is_valid()); | 187 DCHECK(platform_handles->back().is_valid()); |
| 185 } | 188 } |
| 186 } | 189 } |
| 187 } | 190 } |
| 188 | 191 |
| 189 return result; | 192 return result; |
| 190 } | 193 } |
| 191 | 194 |
| 192 } // namespace edk | 195 } // namespace edk |
| 193 } // namespace mojo | 196 } // namespace mojo |
| OLD | NEW |