aboutsummaryrefslogtreecommitdiff
path: root/doc/examples/websocket.c
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/websocket.c')
-rw-r--r--doc/examples/websocket.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/examples/websocket.c b/doc/examples/websocket.c
index fad1e95f..4fa6f4ed 100644
--- a/doc/examples/websocket.c
+++ b/doc/examples/websocket.c
@@ -286,15 +286,16 @@ make_blocking (MHD_socket fd)
286 286
287 flags = fcntl (fd, F_GETFL); 287 flags = fcntl (fd, F_GETFL);
288 if (-1 == flags) 288 if (-1 == flags)
289 return; 289 abort ();
290 if ((flags & ~O_NONBLOCK) != flags) 290 if ((flags & ~O_NONBLOCK) != flags)
291 if (-1 == fcntl (fd, F_SETFL, flags & ~O_NONBLOCK)) 291 if (-1 == fcntl (fd, F_SETFL, flags & ~O_NONBLOCK))
292 abort (); 292 abort ();
293#else 293#else /* _WIN32 */
294 unsigned long flags = 0; 294 unsigned long flags = 0;
295 295
296 ioctlsocket (fd, FIONBIO, &flags); 296 if (0 != ioctlsocket (fd, (int) FIONBIO, &flags))
297#endif 297 abort ();
298#endif /* _WIN32 */
298} 299}
299 300
300 301