Explicitly cast __s64 to time_t [Bug #17645]

A workaround of shorten-64-to-32 error where 32-bit linux.
This commit is contained in:
xtkoba (Tee KOBAYASHI) 2021-03-14 20:10:01 +09:00 committed by Nobuyoshi Nakada
parent c7e6914b39
commit 3ac28de541
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6

2
file.c
View File

@ -1253,7 +1253,7 @@ statx_birthtime(const struct statx *stx, VALUE fname)
/* birthtime is not supported on the filesystem */
statx_notimplement("birthtime");
}
return rb_time_nano_new(stx->stx_btime.tv_sec, stx->stx_btime.tv_nsec);
return rb_time_nano_new((time_t)stx->stx_btime.tv_sec, stx->stx_btime.tv_nsec);
}
typedef struct statx statx_data;