*** socket.c.orig 2010-02-04 00:40:55.643000000 +0900 --- socket.c 2010-05-19 08:53:59.429000000 +0900 *************** *** 385,391 **** FD_ZERO(&except_fds); FD_SET(self->socket, &fds); FD_SET(self->socket, &except_fds); ! ret = select((int) self->socket + 1, NULL, &fds, &except_fds, timeout > 0 ? &tm : NULL); gerrno = SOCK_ERRNO; if (0 < ret) break; --- 385,391 ---- FD_ZERO(&except_fds); FD_SET(self->socket, &fds); FD_SET(self->socket, &except_fds); ! ret = select(1, NULL, &fds, &except_fds, timeout > 0 ? &tm : NULL); gerrno = SOCK_ERRNO; if (0 < ret) break; *************** *** 497,503 **** tm.tv_sec = retry_count; tm.tv_usec = 0; } ! ret = select((int) sock->socket + 1, output ? NULL : &fds, output ? &fds : NULL, &except_fds, no_timeout ? NULL : &tm); gerrno = SOCK_ERRNO; } while (ret < 0 && EINTR == gerrno); if (retry_count < 0) --- 497,503 ---- tm.tv_sec = retry_count; tm.tv_usec = 0; } ! ret = select(1, output ? NULL : &fds, output ? &fds : NULL, &except_fds, no_timeout ? NULL : &tm); gerrno = SOCK_ERRNO; } while (ret < 0 && EINTR == gerrno); if (retry_count < 0)