repositories
/
deb_libnfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f5a4885
)
[add] - implement set_non_blocking for socket
author
unknown
<memphis@machzwo.de>
Fri, 2 Sep 2011 22:27:02 +0000
(
00:27
+0200)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Sat, 3 Sep 2011 05:30:01 +0000
(15:30 +1000)
lib/socket.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/socket.c
b/lib/socket.c
index fe2068c54029c516f53c64ceebf7c0517699cb99..efe87393108d5038e37869f0d354f87aedeb0a06 100644
(file)
--- 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