mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
linux: Fix ENOTSOCK handling in sendfile(2)
The Linux way for sendfile(2) to tell the application to fallback to another way of copying data is by EINVAL, not ENOTSOCK. This fixes package installation scripts for Mono packages from Focal. Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D32604
This commit is contained in:
parent
3417c29851
commit
2c7f798282
1 changed files with 2 additions and 0 deletions
|
|
@ -2101,6 +2101,8 @@ linux_sendfile_common(struct thread *td, l_int out, l_int in,
|
|||
td->td_retval[0] = (ssize_t)bytes_read;
|
||||
drop:
|
||||
fdrop(fp, td);
|
||||
if (error == ENOTSOCK)
|
||||
error = EINVAL;
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue