From d303d72014dc93223b8b8d565188ca6c8fe179e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Kul=C3=ADk?= Date: Wed, 19 Aug 2026 17:06:45 +0200 Subject: [PATCH] fix zerocopy on Solaris --- src/net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/net.c b/src/net.c index a8c327908..cc9d097db 100644 --- a/src/net.c +++ b/src/net.c @@ -43,7 +43,7 @@ #endif #ifdef HAVE_SENDFILE -#ifdef linux +#if defined(linux) || defined(__sun) #include #else #ifdef __FreeBSD__ @@ -784,7 +784,7 @@ Nsendfile(int fromfd, int tofd, const char *buf, size_t count) nleft = count; while (nleft > 0) { offset = count - nleft; -#ifdef linux +#if defined(linux) || defined(__sun) r = sendfile(tofd, fromfd, &offset, nleft); if (r > 0) nleft -= r; @@ -820,7 +820,7 @@ Nsendfile(int fromfd, int tofd, const char *buf, size_t count) return NET_HARDERROR; } } -#ifdef linux +#if defined(linux) || defined(__sun) else if (r == 0) return NET_SOFTERROR; #endif