Skip to content

Commit

Permalink
Cherry pick PR #2040: Rename global variable in eztime (#2042)
Browse files Browse the repository at this point in the history
Refer to the original PR: youtube/cobalt#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 <[email protected]>
  • Loading branch information
1 parent 3ad99da commit 344c437
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions starboard/client_porting/eztime/eztime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 344c437

Please sign in to comment.