OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #if !defined(DART_IO_DISABLED) | 5 #if !defined(DART_IO_DISABLED) |
6 | 6 |
7 #include "platform/globals.h" | 7 #include "platform/globals.h" |
8 #if defined(HOST_OS_FUCHSIA) | 8 #if defined(HOST_OS_FUCHSIA) |
9 | 9 |
10 #include "bin/socket.h" | |
11 | |
12 #include <errno.h> // NOLINT | 10 #include <errno.h> // NOLINT |
| 11 #include <fcntl.h> // NOLINT |
| 12 #include <ifaddrs.h> // NOLINT |
| 13 #include <net/if.h> // NOLINT |
| 14 #include <netinet/tcp.h> // NOLINT |
| 15 #include <stdio.h> // NOLINT |
| 16 #include <stdlib.h> // NOLINT |
| 17 #include <string.h> // NOLINT |
| 18 #include <sys/ioctl.h> // NOLINT |
| 19 #include <sys/stat.h> // NOLINT |
| 20 #include <unistd.h> // NOLINT |
13 | 21 |
14 #include "bin/fdutils.h" | 22 #include "bin/fdutils.h" |
| 23 #include "bin/file.h" |
| 24 #include "bin/socket.h" |
| 25 #include "bin/socket_base_fuchsia.h" |
15 #include "platform/signal_blocker.h" | 26 #include "platform/signal_blocker.h" |
16 | 27 |
17 // #define SOCKET_LOG_INFO 1 | 28 // #define SOCKET_LOG_INFO 1 |
18 // #define SOCKET_LOG_ERROR 1 | 29 // #define SOCKET_LOG_ERROR 1 |
19 | 30 |
20 // define SOCKET_LOG_ERROR to get log messages only for errors. | 31 // define SOCKET_LOG_ERROR to get log messages only for errors. |
21 // define SOCKET_LOG_INFO to get log messages for both information and errors. | 32 // define SOCKET_LOG_INFO to get log messages for both information and errors. |
22 #if defined(SOCKET_LOG_INFO) || defined(SOCKET_LOG_ERROR) | 33 #if defined(SOCKET_LOG_INFO) || defined(SOCKET_LOG_ERROR) |
23 #define LOG_ERR(msg, ...) \ | 34 #define LOG_ERR(msg, ...) \ |
24 { \ | 35 { \ |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 } | 232 } |
222 return socket; | 233 return socket; |
223 } | 234 } |
224 | 235 |
225 } // namespace bin | 236 } // namespace bin |
226 } // namespace dart | 237 } // namespace dart |
227 | 238 |
228 #endif // defined(HOST_OS_FUCHSIA) | 239 #endif // defined(HOST_OS_FUCHSIA) |
229 | 240 |
230 #endif // !defined(DART_IO_DISABLED) | 241 #endif // !defined(DART_IO_DISABLED) |
OLD | NEW |