Avoid using the altzone variable in AIX
In AIX, altzone exists in the standard library but is not declared in time.h. By 524513be399e81bb170ec88aa0d501f33cbde8c3, 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:
parent
2962c421e1
commit
ceeae31901
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user