From 59aba46c6feee575bdae0be3d9d173b8c1f50013 Mon Sep 17 00:00:00 2001 From: John Elliott Date: Fri, 29 Oct 2021 11:57:15 -0700 Subject: [PATCH] Removed timezone usage in UnixRealTimeClock::CurrentTimeVal when calling gettimeofday. Timezone (tz) was unused in this case. When porting webRTC to certain platforms it caused runtime asserts when unsupported. Additionally, the timezone parameter is obsolete and should now be NULL according to https://man7.org/linux/man-pages/man2/gettimeofday.2.html. Bug: None Change-Id: Ic9183dd79b371ddcaad5da797ccb91beeea2be2f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/236722 Reviewed-by: Henrik Andreassson Reviewed-by: Magnus Flodman Commit-Queue: Magnus Flodman Cr-Commit-Position: refs/heads/main@{#35293} --- system_wrappers/source/clock.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/system_wrappers/source/clock.cc b/system_wrappers/source/clock.cc index 1764bf2cd2..7784246fa4 100644 --- a/system_wrappers/source/clock.cc +++ b/system_wrappers/source/clock.cc @@ -248,10 +248,7 @@ class UnixRealTimeClock : public RealTimeClock { protected: timeval CurrentTimeVal() override { struct timeval tv; - struct timezone tz; - tz.tz_minuteswest = 0; - tz.tz_dsttime = 0; - gettimeofday(&tv, &tz); + gettimeofday(&tv, nullptr); return tv; } };