summaryrefslogtreecommitdiff
path: root/source3/lib/sendfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/sendfile.c')
-rw-r--r--source3/lib/sendfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/sendfile.c b/source3/lib/sendfile.c
index d1b178577c..fb10cae2aa 100644
--- a/source3/lib/sendfile.c
+++ b/source3/lib/sendfile.c
@@ -65,7 +65,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of
#endif
} while (nwritten == -1 && errno == EINTR);
if (nwritten == -1) {
- if (errno == ENOSYS) {
+ if (errno == ENOSYS || errno == EINVAL) {
/* Ok - we're in a world of pain here. We just sent
* the header, but the sendfile failed. We have to
* emulate the sendfile at an upper layer before we
@@ -143,7 +143,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of
nwritten = sendfile(tofd, fromfd, &small_offset, small_total);
} while (nwritten == -1 && errno == EINTR);
if (nwritten == -1) {
- if (errno == ENOSYS) {
+ if (errno == ENOSYS || errno == EINVAL) {
/* Ok - we're in a world of pain here. We just sent
* the header, but the sendfile failed. We have to
* emulate the sendfile at an upper layer before we