Mercurial > hg > icedtea8-forest > hotspot
changeset 10875:1df9d5db32db
8251365: Build failure on AIX after 8250636
Reviewed-by: phh, andrew
author | snazarki |
---|---|
date | Tue, 11 Aug 2020 13:03:15 +0300 |
parents | 46bd8a39ef9c |
children | 80747d91749a |
files | src/share/vm/runtime/os.cpp |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/runtime/os.cpp Mon Aug 10 11:25:38 2020 +0300 +++ b/src/share/vm/runtime/os.cpp Tue Aug 11 13:03:15 2020 +0300 @@ -148,19 +148,23 @@ const time_t seconds_per_hour = seconds_per_minute * minutes_per_hour; time_t UTC_to_local = 0; -#if defined(_WINDOWS) +#if defined(_ALLBSD_SOURCE) || defined(_GNU_SOURCE) + UTC_to_local = -(time_struct.tm_gmtoff); +#elif defined(_WINDOWS) long zone; _get_timezone(&zone); UTC_to_local = static_cast<time_t>(zone); +#else + UTC_to_local = timezone; +#endif + // tm_gmtoff already includes adjustment for daylight saving +#if !defined(_ALLBSD_SOURCE) && !defined(_GNU_SOURCE) // If daylight savings time is in effect, // we are 1 hour East of our time zone if (time_struct.tm_isdst > 0) { UTC_to_local = UTC_to_local - seconds_per_hour; } -#else - // tm_gmtoff already includes adjustment for daylight saving - UTC_to_local = -(time_struct.tm_gmtoff); #endif // Compute the time zone offset.