summaryrefslogtreecommitdiff
path: root/thread_sync.c
diff options
context:
space:
mode:
authorNARUSE, Yui <naruse@airemix.jp>2021-03-14 21:30:23 +0900
committerNARUSE, Yui <naruse@airemix.jp>2021-03-14 21:30:23 +0900
commitff2ea4daeb795ebb3d0afa8c57d86a4af9757e50 (patch)
treef3fc127caeab4b33eb479992acf9923379973be9 /thread_sync.c
parente050dd53230cb354e816415f8a937901f79ec395 (diff)
merge revision(s) 2a6bfd22468343003463e0cbf91953a01b0dbba5,3ac28de5414c81a0da8c8ec969ea74db5a0f1b0f: [Backport #17645]
Properly convert time_t [Bug #17645] --- thread_sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Explicitly cast __s64 to time_t [Bug #17645] A workaround of shorten-64-to-32 error where 32-bit linux. --- file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Diffstat (limited to 'thread_sync.c')
-rw-r--r--thread_sync.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread_sync.c b/thread_sync.c
index 8c999e2164..11d77e8e91 100644
--- a/thread_sync.c
+++ b/thread_sync.c
@@ -560,7 +560,7 @@ rb_mutex_sleep(VALUE self, VALUE timeout)
RUBY_VM_CHECK_INTS_BLOCKING(GET_EC());
time_t end = time(0) - beg;
- return INT2FIX(end);
+ return TIMET2NUM(end);
}
/*