From 03f9ae5aa0a35f194b1274a9f2e4ad843765c71e Mon Sep 17 00:00:00 2001 From: James Duong Date: Thu, 23 Jun 2022 13:37:35 -0700 Subject: [PATCH] Fix Mac build break gmtime_r takes in a time_t, which is not necessarily the same type as an int64_t. Change-Id: I0c049ca373b71b6718d3a5e718802a48c7460b3d --- src/test/src/result-conversions-test.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/src/result-conversions-test.cc b/src/test/src/result-conversions-test.cc index 95cb93d..08fcf1e 100644 --- a/src/test/src/result-conversions-test.cc +++ b/src/test/src/result-conversions-test.cc @@ -45,9 +45,10 @@ namespace { void GetTimeForMillisSinceEpoch(tm& date, int64_t value) { #if defined(_WIN32) - gmtime_s(&date, &value); + gmtime_s(&date, &value); #else - gmtime_r(&value, &date); + time_t time_value = static_cast(value); + gmtime_r(&time_value, &date); #endif }