diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-08 09:59:58 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-08 09:59:58 +0000 |
commit | e1a304ff665f74036c7a848cb1fd3cf49e3ae3db (patch) | |
tree | f215b2c6751da117242c1026ca81f82db42379c8 /win32/win32.c | |
parent | c5258c5dca209ba943d34677ecd70cfc4c1348e9 (diff) |
merge revision(s) 19486:
* win32/win32.c (subtruct): check tv_sec.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@23156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/win32/win32.c b/win32/win32.c index 96e235af93..1d342316fe 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -2196,6 +2196,9 @@ do_select(int nfds, fd_set *rd, fd_set *wr, fd_set *ex, static inline int subtract(struct timeval *rest, const struct timeval *wait) { + if (rest->tv_sec < wait->tv_sec) { + return 0; + } while (rest->tv_usec < wait->tv_usec) { if (rest->tv_sec <= wait->tv_sec) { return 0; |