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:
+10
-2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user