OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 // winsock2.h must be included first in order to ensure it is included before | 8 // winsock2.h must be included first in order to ensure it is included before |
9 // windows.h. | 9 // windows.h. |
10 #include <winsock2.h> | 10 #include <winsock2.h> |
11 #elif defined(OS_POSIX) | 11 #elif defined(OS_POSIX) |
12 #include <errno.h> | 12 #include <errno.h> |
13 #include <sys/socket.h> | 13 #include <sys/socket.h> |
14 #include <arpa/inet.h> | 14 #include <arpa/inet.h> |
15 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
16 #include "third_party/libevent/event.h" | 16 #include "third_party/libevent/event.h" |
17 #endif | 17 #endif |
18 | 18 |
| 19 #if defined(OS_FREEBSD) |
| 20 #include <netinet/in.h> |
| 21 #endif |
| 22 |
19 #include "base/eintr_wrapper.h" | 23 #include "base/eintr_wrapper.h" |
20 #include "net/base/net_util.h" | 24 #include "net/base/net_util.h" |
21 #include "net/base/listen_socket.h" | 25 #include "net/base/listen_socket.h" |
22 | 26 |
23 #if defined(OS_WIN) | 27 #if defined(OS_WIN) |
24 typedef int socklen_t; | 28 typedef int socklen_t; |
25 #endif // defined(OS_WIN) | 29 #endif // defined(OS_WIN) |
26 | 30 |
27 namespace { | 31 namespace { |
28 | 32 |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 } | 296 } |
293 } | 297 } |
294 | 298 |
295 void ListenSocket::OnFileCanWriteWithoutBlocking(int fd) { | 299 void ListenSocket::OnFileCanWriteWithoutBlocking(int fd) { |
296 // MessagePumpLibevent callback, we don't listen for write events | 300 // MessagePumpLibevent callback, we don't listen for write events |
297 // so we shouldn't ever reach here. | 301 // so we shouldn't ever reach here. |
298 NOTREACHED(); | 302 NOTREACHED(); |
299 } | 303 } |
300 | 304 |
301 #endif | 305 #endif |
OLD | NEW |