Fix bug with sendfile() on XNU

This commit is contained in:
Justine Tunney 2022-09-13 04:32:29 -07:00
parent 790c661317
commit 827f25f054
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
3 changed files with 26 additions and 12 deletions

View file

@ -37,8 +37,8 @@ ssize_t sys_readv_metal(struct Fd *fd, const struct iovec *iov, int iovlen) {
* escape sequences, in response to requests sent to it via write().
* Read & return these if they are available.
*/
if (_weaken(sys_readv_vga)) {
ssize_t res = _weaken(sys_readv_vga)(fd, iov, iovlen);
if (weaken(sys_readv_vga)) {
ssize_t res = weaken(sys_readv_vga)(fd, iov, iovlen);
if (res > 0) return res;
}
/* fall through */