Avoid using the altzone variable in AIX

In AIX, altzone exists in the standard library but is not declared
in time.h.  By 524513be39, have_var
and try_var in mkmf recognizes a variable that exists in a library
even when it is not declared.  As a result, in AIX, HAVE_ALTZONE
is defined, but compile fails due to the lack of the declaration.
This commit is contained in:
Rei Odaira 2021-10-02 21:22:37 -05:00
Родитель 2962c421e1
Коммит ceeae31901
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -7797,7 +7797,7 @@ datetime_s_now(int argc, VALUE *argv, VALUE klass)
#ifdef HAVE_STRUCT_TM_TM_GMTOFF
of = tm.tm_gmtoff;
#elif defined(HAVE_TIMEZONE)
#ifdef HAVE_ALTZONE
#if defined(HAVE_ALTZONE) && !defined(_AIX)
of = (long)-((tm.tm_isdst > 0) ? altzone : timezone);
#else
of = (long)-timezone;