diff options
author | Rei Odaira <rodaira@us.ibm.com> | 2021-10-02 21:22:37 -0500 |
---|---|---|
committer | Rei Odaira <rodaira@us.ibm.com> | 2021-10-02 21:23:34 -0500 |
commit | ceeae31901275c9a3fde19aa05b343fbcf6187d1 (patch) | |
tree | 615b535271fbd19cc9249ba0b1942fdd5ae8271b /ext | |
parent | 2962c421e1433bffc85130385b1e9ced263a356e (diff) |
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.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/date/date_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/date/date_core.c b/ext/date/date_core.c index 4a2225fd2c..146f60fef6 100644 --- a/ext/date/date_core.c +++ b/ext/date/date_core.c @@ -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; |