From ff3f93a3bae65a9a1478874b09758a85d50f6eb3 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 7 Oct 2022 00:32:09 -0500 Subject: [PATCH] sendfile() can also return EXDEV, so fall back to read/write loop on any error. --- lib/portability.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/portability.c b/lib/portability.c index 7be909ea..443d31f9 100644 --- a/lib/portability.c +++ b/lib/portability.c @@ -652,7 +652,7 @@ long long sendfile_len(int in, int out, long long bytes, long long *consumed) errno = EINVAL; len = -1; #endif - if (len < 0 && (errno == EINVAL || errno == ENOSYS)) { + if (len < 0) { try_cfr = 0; continue; -- 2.39.2