summaryrefslogtreecommitdiff
path: root/absl/time/duration_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/time/duration_test.cc')
-rw-r--r--absl/time/duration_test.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/absl/time/duration_test.cc b/absl/time/duration_test.cc
index 61f3c5c0..5dce9ac8 100644
--- a/absl/time/duration_test.cc
+++ b/absl/time/duration_test.cc
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@@ -12,6 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#if defined(_MSC_VER)
+#include <winsock2.h> // for timeval
+#endif
+
#include <chrono> // NOLINT(build/c++11)
#include <cmath>
#include <cstdint>
@@ -1771,7 +1775,7 @@ TEST(Duration, ParseDuration) {
TEST(Duration, FormatParseRoundTrip) {
#define TEST_PARSE_ROUNDTRIP(d) \
do { \
- std::string s = absl::FormatDuration(d); \
+ std::string s = absl::FormatDuration(d); \
absl::Duration dur; \
EXPECT_TRUE(absl::ParseDuration(s, &dur)); \
EXPECT_EQ(d, dur); \