From 344c43790765f8556148d8093d4f9b86baa7d56e Mon Sep 17 00:00:00 2001 From: cobalt-github-releaser-bot <95661244+cobalt-github-releaser-bot@users.noreply.github.com> Date: Tue, 5 Dec 2023 17:25:31 -0800 Subject: [PATCH] Cherry pick PR #2040: Rename global variable in eztime (#2042) Refer to the original PR: https://github.com/youtube/cobalt/pull/2040 Avoid a confusing symbol name clash between `g_initialization_once` in icu_init.cc and eztime.cc by renaming the eztime symbol to `g_eztime_initialization_once` Note that both symbols are in anonymous namespaces so - they are not the same. See b/246412559#comment66 , #60 for more details. b/246412559 Co-authored-by: Niranjan Yardi --- starboard/client_porting/eztime/eztime.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/starboard/client_porting/eztime/eztime.cc b/starboard/client_porting/eztime/eztime.cc index 76382009f2517..97a3bb978142d 100644 --- a/starboard/client_porting/eztime/eztime.cc +++ b/starboard/client_porting/eztime/eztime.cc @@ -37,7 +37,7 @@ const int kMaxTimeZoneSize = 32; UChar g_timezones[kEzTimeZoneCount][kMaxTimeZoneSize]; // Once control for initializing eztime static data. -SbOnceControl g_initialization_once = SB_ONCE_INITIALIZER; +SbOnceControl g_eztime_initialization_once = SB_ONCE_INITIALIZER; // The timezone names in ASCII (UTF8-compatible) literals. This must match the // order of the EzTimeZone enum. @@ -89,7 +89,7 @@ UDate SbTimeToUDate(SbTime sb_time) { // Gets the cached TimeZone ID from |g_timezones| for the given EzTimeZone // |timezone|. const UChar* GetTimeZoneId(EzTimeZone timezone) { - SbOnce(&g_initialization_once, &Initialize); + SbOnce(&g_eztime_initialization_once, &Initialize); const UChar* timezone_id = g_timezones[timezone]; if (timezone_id[0] == 0) { return NULL;