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

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: 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
« net/tools/quic/quic_client.cc ('K') | « 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
Ryan Hamilton 2015/03/12 03:34:38 Should this be wrapped in an #if apple_or_darwin_o
dougk 2015/03/12 12:39:10 Personally I find it less ugly not to add preamble
Ryan Hamilton 2015/03/12 17:55:41 I'm happy with adding a #undef but leaving off an
8 #include <netinet/in.h> 15 #include <netinet/in.h>
9 #include <sys/socket.h> 16 #include <sys/socket.h>
10 #include <sys/uio.h> 17 #include <sys/uio.h>
11 #include <string> 18 #include <string>
12 19
13 #include "base/basictypes.h" 20 #include "base/basictypes.h"
14 #include "base/logging.h" 21 #include "base/logging.h"
15 #include "net/quic/quic_protocol.h" 22 #include "net/quic/quic_protocol.h"
16 23
17 #ifndef SO_RXQ_OVFL 24 #ifndef SO_RXQ_OVFL
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 int rc = sendmsg(fd, &hdr, 0); 246 int rc = sendmsg(fd, &hdr, 0);
240 if (rc >= 0) { 247 if (rc >= 0) {
241 return WriteResult(WRITE_STATUS_OK, rc); 248 return WriteResult(WRITE_STATUS_OK, rc);
242 } 249 }
243 return WriteResult((errno == EAGAIN || errno == EWOULDBLOCK) ? 250 return WriteResult((errno == EAGAIN || errno == EWOULDBLOCK) ?
244 WRITE_STATUS_BLOCKED : WRITE_STATUS_ERROR, errno); 251 WRITE_STATUS_BLOCKED : WRITE_STATUS_ERROR, errno);
245 } 252 }
246 253
247 } // namespace tools 254 } // namespace tools
248 } // namespace net 255 } // namespace net
OLDNEW
« net/tools/quic/quic_client.cc ('K') | « net/tools/quic/quic_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698