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

Side by Side Diff: webrtc/base/physicalsocketserver.cc

Issue 2008573002: Don't read socket timestamps when building native client. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: defined Created 4 years, 7 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 | « no previous file | 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 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #include "webrtc/base/physicalsocketserver.h" 10 #include "webrtc/base/physicalsocketserver.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "webrtc/base/winping.h" 52 #include "webrtc/base/winping.h"
53 #include "webrtc/base/win32socketinit.h" 53 #include "webrtc/base/win32socketinit.h"
54 54
55 #if defined(WEBRTC_POSIX) 55 #if defined(WEBRTC_POSIX)
56 #include <netinet/tcp.h> // for TCP_NODELAY 56 #include <netinet/tcp.h> // for TCP_NODELAY
57 #define IP_MTU 14 // Until this is integrated from linux/in.h to netinet/in.h 57 #define IP_MTU 14 // Until this is integrated from linux/in.h to netinet/in.h
58 typedef void* SockOptArg; 58 typedef void* SockOptArg;
59 59
60 #endif // WEBRTC_POSIX 60 #endif // WEBRTC_POSIX
61 61
62 #if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) 62 #if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__)
63
63 int64_t GetSocketRecvTimestamp(int socket) { 64 int64_t GetSocketRecvTimestamp(int socket) {
64 struct timeval tv_ioctl; 65 struct timeval tv_ioctl;
65 int ret = ioctl(socket, SIOCGSTAMP, &tv_ioctl); 66 int ret = ioctl(socket, SIOCGSTAMP, &tv_ioctl);
66 if (ret != 0) 67 if (ret != 0)
67 return -1; 68 return -1;
68 int64_t timestamp = 69 int64_t timestamp =
69 rtc::kNumMicrosecsPerSec * static_cast<int64_t>(tv_ioctl.tv_sec) + 70 rtc::kNumMicrosecsPerSec * static_cast<int64_t>(tv_ioctl.tv_sec) +
70 static_cast<int64_t>(tv_ioctl.tv_usec); 71 static_cast<int64_t>(tv_ioctl.tv_usec);
71 return timestamp; 72 return timestamp;
72 } 73 }
(...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1655 break; 1656 break;
1656 } 1657 }
1657 } 1658 }
1658 1659
1659 // Done 1660 // Done
1660 return true; 1661 return true;
1661 } 1662 }
1662 #endif // WEBRTC_WIN 1663 #endif // WEBRTC_WIN
1663 1664
1664 } // namespace rtc 1665 } // namespace rtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698