From 63f787b602f73dd348b6bbf2df795390e5c7411f Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 21 Aug 2022 00:51:30 -0500 Subject: [PATCH] If the kernel hasn't got sendfile() it can return ENOSYS, not just EINVAL. --- lib/portability.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/portability.c b/lib/portability.c index 6fac2c36..d955d081 100644 --- a/lib/portability.c +++ b/lib/portability.c @@ -651,7 +651,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) { + if (len < 0 && (errno == EINVAL || errno == ENOSYS)) { try_cfr = 0; continue; -- 2.39.2