sendfile: Fix build for kernels without INET or INET6

Don't cap the new low watermark to a TCP-specific setting in kernels
without TCP.

Fixes:		6948f4d5e2 ("sendfile: keep the lowat hack more conservative")
This commit is contained in:
John Baldwin committed 2026-10-05 22:35:15 -04:00
1 parent c907302c12
commit 1d8c5f8e02
1 file changed
+4
+4
View File
@@ -660,7 +660,11 @@ sendfile_wait_generic(struct socket *so, off_t need, int *space)
SOCK_SENDBUF_LOCK(so);
lowat = so->so_snd.sb_lowat;
if (so->so_snd.sb_flags & SB_AUTOLOWAT) {
#if defined(INET) || defined(INET6)
newlowat = min(V_tcp_sendspace, so->so_snd.sb_hiwat) / 2;
#else
newlowat = so->so_snd.sb_hiwat / 2;
#endif
if (so->so_snd.sb_lowat < newlowat)
so->so_snd.sb_lowat = newlowat;
if (so->so_snd.sb_lowat < PAGE_SIZE &&