Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Side by Side Diff: net/tools/quic/quic_socket_utils.cc

Issue 994193002: Compile quic_server on MacOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undefine __APPLE_USE_RFC_n after use Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/tools/quic/quic_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/tools/quic/quic_socket_utils.h" 5 #include "net/tools/quic/quic_socket_utils.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 // Apple's "in6.h" header file says:
9 // * RFC 3542 define[s] the following socket options in a manner incompatible
10 // * with RFC 2292:
11 // * IPV6_PKTINFO
12 // and in order to get IPV6_PKTINFO defined at all,
13 // you must pick a mode, as follows:
14 #define __APPLE_USE_RFC_3542
8 #include <netinet/in.h> 15 #include <netinet/in.h>
16 #undef __APPLE_USE_RFC_3542
9 #include <sys/socket.h> 17 #include <sys/socket.h>
10 #include <sys/uio.h> 18 #include <sys/uio.h>
11 #include <string> 19 #include <string>
12 20
13 #include "base/basictypes.h" 21 #include "base/basictypes.h"
14 #include "base/logging.h" 22 #include "base/logging.h"
15 #include "net/quic/quic_protocol.h" 23 #include "net/quic/quic_protocol.h"
16 24
17 #ifndef SO_RXQ_OVFL 25 #ifndef SO_RXQ_OVFL
18 #define SO_RXQ_OVFL 40 26 #define SO_RXQ_OVFL 40
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 int rc = sendmsg(fd, &hdr, 0); 245 int rc = sendmsg(fd, &hdr, 0);
238 if (rc >= 0) { 246 if (rc >= 0) {
239 return WriteResult(WRITE_STATUS_OK, rc); 247 return WriteResult(WRITE_STATUS_OK, rc);
240 } 248 }
241 return WriteResult((errno == EAGAIN || errno == EWOULDBLOCK) ? 249 return WriteResult((errno == EAGAIN || errno == EWOULDBLOCK) ?
242 WRITE_STATUS_BLOCKED : WRITE_STATUS_ERROR, errno); 250 WRITE_STATUS_BLOCKED : WRITE_STATUS_ERROR, errno);
243 } 251 }
244 252
245 } // namespace tools 253 } // namespace tools
246 } // namespace net 254 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698