mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
Fix WinXP version of thrift_poll to not use destructed time_out
This commit is contained in:
parent
b0dadbde6a
commit
d1c0d33199
@ -67,7 +67,8 @@ int thrift_poll(THRIFT_POLLFD* fdArray, ULONG nfds, INT timeout) {
|
||||
timeval time_out;
|
||||
timeval* time_out_ptr = NULL;
|
||||
if (timeout >= 0) {
|
||||
timeval time_out = {timeout / 1000, (timeout % 1000) * 1000};
|
||||
time_out.tv_sec = timeout / 1000;
|
||||
time_out.tv_usec = (timeout % 1000) * 1000;
|
||||
time_out_ptr = &time_out;
|
||||
} else { // to avoid compiler warnings
|
||||
(void)time_out;
|
||||
|
Loading…
Reference in New Issue
Block a user