summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;