all repos — mgba @ 0ab8cfe6ad84afbeca3ed220d591b78cae90fcca

mGBA Game Boy Advance Emulator

Util: Fix SocketPoll on pthreads
Jeffrey Pfau jeffrey@endrift.com
Tue, 03 Mar 2015 02:28:52 -0800
commit

0ab8cfe6ad84afbeca3ed220d591b78cae90fcca

parent

9273a4ca724f82b41a6d5da74e2dc002fc4d1858

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/util/socket.hsrc/util/socket.h

@@ -253,7 +253,7 @@ }

struct timeval tv; tv.tv_sec = timeoutMillis / 1000; tv.tv_usec = (timeoutMillis % 1000) * 1000; - int result = select(maxFd, &rset, &wset, &eset, timeoutMillis < 0 ? 0 : &tv); + int result = select(maxFd + 1, &rset, &wset, &eset, timeoutMillis < 0 ? 0 : &tv); int r = 0; int w = 0; int e = 0;