diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-10-14 20:09:37 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-10-14 23:44:15 +0900 |
commit | e057b9eea9021046a43dd59f45fe0cf34d69e8cb (patch) | |
tree | d810f3e016ead407495fb3f9698eb46a6e4f2f43 /time.c | |
parent | fc9f9231cf6ce911df37256faf22e6e8e23cb988 (diff) | |
download | ruby-e057b9eea9021046a43dd59f45fe0cf34d69e8cb.tar.gz |
Prefer the reentrant versions of gmtime and localtime
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1169,7 +1169,11 @@ init_leap_second_info(void) struct vtm vtm; wideval_t timew; now = time(NULL); +#ifdef HAVE_GMTIME_R + gmtime_r(&now, &result); +#else gmtime(&now); +#endif tm = gmtime_with_leapsecond(&now, &result); if (!tm) return; this_year = tm->tm_year; |