From: unknown Date: Fri, 2 Sep 2011 22:27:02 +0000 (+0200) Subject: [add] - implement set_non_blocking for socket X-Git-Tag: upstream/1.9.6^2~311 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=99c14c9b8195e9b79e47ca6c059340afc01d2578;p=deb_libnfs.git [add] - implement set_non_blocking for socket --- diff --git a/lib/socket.c b/lib/socket.c index fe2068c..efe8739 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -66,9 +66,11 @@ static int rpc_disconnect_requeue(struct rpc_context *rpc); static void set_nonblocking(int fd) { + int v = 0; #if defined(WIN32) + long nonblocking=1; + v = ioctlsocket(fd, FIONBIO,&nonblocking); #else - unsigned v; v = fcntl(fd, F_GETFL, 0); fcntl(fd, F_SETFL, v | O_NONBLOCK); #endif //FIXME