summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/onefs_system.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/modules/onefs_system.c b/source3/modules/onefs_system.c
index 33bec2658b..94b5da2a9e 100644
--- a/source3/modules/onefs_system.c
+++ b/source3/modules/onefs_system.c
@@ -269,7 +269,11 @@ static ssize_t onefs_sys_do_sendfile(int tofd, int fromfd,
do {
ret = sendfile(fromfd, tofd, offset, total, &hdr,
&nwritten, flags);
- } while (ret == -1 && errno == EINTR);
+#if defined(EWOULDBLOCK)
+ } while (ret == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK));
+#else
+ } while (ret == -1 && (errno == EINTR || errno == EAGAIN));
+#endif
/* On error we're done. */
if (ret == -1) {