Skip to content

Commit

Permalink
Avoid using the altzone variable in AIX
Browse files Browse the repository at this point in the history
In AIX, altzone exists in the standard library but is not declared
in time.h.  By 524513b, 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.
  • Loading branch information
odaira committed Oct 3, 2021
1 parent 2962c42 commit ceeae31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/date/date_core.c
Expand Up @@ -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;
Expand Down

0 comments on commit ceeae31

Please sign in to comment.