time.c: Check if defined(RUBY_MSVCRT_VERSION) to build on Solaris

Fixes [Bug #17947]
This commit is contained in:
Yusuke Endoh 2021-06-14 10:40:41 +09:00
parent 09ea2bb040
commit 688b217706

2
time.c
View File

@ -1623,7 +1623,7 @@ localtime_with_gmtoff_zone(const time_t *t, struct tm *result, long *gmtoff, VAL
#if defined(HAVE_TM_ZONE) #if defined(HAVE_TM_ZONE)
*zone = zone_str(tm.tm_zone); *zone = zone_str(tm.tm_zone);
#elif defined(HAVE_TZNAME) && defined(HAVE_DAYLIGHT) #elif defined(HAVE_TZNAME) && defined(HAVE_DAYLIGHT)
# if RUBY_MSVCRT_VERSION >= 140 # if defined(RUBY_MSVCRT_VERSION) && RUBY_MSVCRT_VERSION >= 140
# define tzname _tzname # define tzname _tzname
# define daylight _daylight # define daylight _daylight
# endif # endif