summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-07 06:49:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-07 06:49:32 +0000
commit76c5787c38a51d42331009f7f02f85dbb8f68217 (patch)
tree22416bc47b25773aacaf30b50c6606208594f7be /thread.c
parentb0cf1c234c142b73d556fe5c66b76a3db8997899 (diff)
thread.c: int32_t instead of suseconds_t
* thread.c (timeval_for): cast to int32_t instead of suseconds_t, which is not defined non-POSIX platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index 375a8a51f5..57adcba26a 100644
--- a/thread.c
+++ b/thread.c
@@ -225,7 +225,7 @@ timeval_for(struct timeval *tv, const struct timespec *ts)
{
if (tv && ts) {
tv->tv_sec = ts->tv_sec;
- tv->tv_usec = (suseconds_t)(ts->tv_nsec / 1000);
+ tv->tv_usec = (int32_t)(ts->tv_nsec / 1000); /* 10**6 < 2**(32-1) */
return tv;
}
return 0;