X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-poll.c;h=bbfefe43e0047848cac5ccc34142a333c8ea13e0;hb=9c9a9765811eb1e698517065953e09d6b8c07400;hp=b0cdb6087a7ce2d19a3371428d719b04ef3a2183;hpb=77041ebc885b2af4e2d48fd49cf5529759351076;p=gnulib.git diff --git a/tests/test-poll.c b/tests/test-poll.c index b0cdb6087..bbfefe43e 100644 --- a/tests/test-poll.c +++ b/tests/test-poll.c @@ -130,10 +130,10 @@ connect_to_socket (int blocking) #ifdef WIN32_NATIVE unsigned long iMode = 1; ioctl (s, FIONBIO, (char *) &iMode); - + #elif defined F_GETFL int oldflags = fcntl (s, F_GETFL, NULL); - + if (!(oldflags & O_NONBLOCK)) fcntl (s, F_SETFL, oldflags | O_NONBLOCK); #endif @@ -161,7 +161,7 @@ poll1 (int fd, int ev, int time) pfd.fd = fd; pfd.events = ev; pfd.revents = 0; - r = poll (&pfd, 1, time); + r = poll (&pfd, 1, time); if (r < 0) return r;