summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2009-02-09 12:11:43 +0100
committerKai Blin <kai@samba.org>2009-02-09 12:13:58 +0100
commitb8cafc5ad21fa999ce52facf605b3c315edde322 (patch)
tree90314130cee59b265fc010019ba1e74ae2c4b946
parent1bf51ea26293120a63e445e07b08ddf718487900 (diff)
downloadsamba-b8cafc5ad21fa999ce52facf605b3c315edde322.tar.gz
samba-b8cafc5ad21fa999ce52facf605b3c315edde322.tar.bz2
samba-b8cafc5ad21fa999ce52facf605b3c315edde322.zip
async_sock: Map ASYNC_REQ_TIMEOUT to ETIMEDOUT instead of ETIME
Also, fall back to EIO if ETIMEDOUT is not present
-rw-r--r--lib/async_req/async_sock.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/async_req/async_sock.c b/lib/async_req/async_sock.c
index 23ac93745e..46ad29d053 100644
--- a/lib/async_req/async_sock.c
+++ b/lib/async_req/async_sock.c
@@ -116,7 +116,11 @@ bool async_req_is_errno(struct async_req *req, int *err)
*err = (int)error;
break;
case ASYNC_REQ_TIMED_OUT:
- *err = ETIME;
+#ifdef HAVE_ETIMEDOUT
+ *err = ETIMEDOUT;
+#else
+ *err = EIO;
+#endif
break;
case ASYNC_REQ_NO_MEMORY:
*err = ENOMEM;