projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New module 'pipe-filter-gi'.
[gnulib.git]
/
tests
/
test-poll.c
diff --git
a/tests/test-poll.c
b/tests/test-poll.c
index
f97b8d5
..
77b06d9
100644
(file)
--- a/
tests/test-poll.c
+++ b/
tests/test-poll.c
@@
-28,6
+28,7
@@
#include <fcntl.h>
#include <stdlib.h>
#include <stdbool.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdbool.h>
+#include <sys/ioctl.h>
#include <errno.h>
#include "sockets.h"
#include <errno.h>
#include "sockets.h"
@@
-129,11
+130,11
@@
connect_to_socket (int blocking)
{
#ifdef WIN32_NATIVE
unsigned long iMode = 1;
{
#ifdef WIN32_NATIVE
unsigned long iMode = 1;
- ioctl
socket (s, FIONBIO, (void
*) &iMode);
-
+ ioctl
(s, FIONBIO, (char
*) &iMode);
+
#elif defined F_GETFL
int oldflags = fcntl (s, F_GETFL, NULL);
#elif defined F_GETFL
int oldflags = fcntl (s, F_GETFL, NULL);
-
+
if (!(oldflags & O_NONBLOCK))
fcntl (s, F_SETFL, oldflags | O_NONBLOCK);
#endif
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;
pfd.fd = fd;
pfd.events = ev;
pfd.revents = 0;
- r = poll (&pfd, 1, time);
+ r = poll (&pfd, 1, time);
if (r < 0)
return r;
if (r < 0)
return r;
@@
-359,7
+360,7
@@
main ()
{
int result;
{
int result;
- gl_sockets_startup (SOCKETS_
2_0
);
+ gl_sockets_startup (SOCKETS_
1_1
);
#ifdef INTERACTIVE
printf ("Please press Enter\n");
#ifdef INTERACTIVE
printf ("Please press Enter\n");