X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-poll.c;h=77b06d9928cc57f36db75af51dcc9aa2f859e19e;hb=f29c8b2585098d92e0bd02af745774673ec25ec7;hp=b0cdb6087a7ce2d19a3371428d719b04ef3a2183;hpb=77041ebc885b2af4e2d48fd49cf5529759351076;p=gnulib.git diff --git a/tests/test-poll.c b/tests/test-poll.c index b0cdb6087..77b06d992 100644 --- a/tests/test-poll.c +++ b/tests/test-poll.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include "sockets.h" @@ -130,10 +131,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 +162,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;