Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#endif

#ifdef HAVE_SENDFILE
#ifdef linux
#if defined(linux) || defined(__sun)
#include <sys/sendfile.h>
#else
#ifdef __FreeBSD__
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
Loading