1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 02:33:17 +02:00

MFH: fix for #24629

This commit is contained in:
Jason Greene
2003-07-25 01:50:09 +00:00
parent 886184c38e
commit 9dbbc057c5
+10 -2
View File
@@ -592,8 +592,16 @@ PHP_FUNCTION(socket_select)
convert_to_long(&tmp);
sec = &tmp;
}
tv.tv_sec = Z_LVAL_P(sec);
tv.tv_usec = usec;
/* Solaris + BSD do not like microsecond values which are >= 1 sec */
if (usec > 999999) {
tv.tv_sec = Z_LVAL_P(sec) + (usec / 1000000);
tv.tv_usec = usec % 1000000;
} else {
tv.tv_sec = Z_LVAL_P(sec);
tv.tv_usec = usec;
}
tv_p = &tv;
if (sec == &tmp) {