Fix Clang support

The amalgamated release is now confirmed to be working with Clang,
including its integrated assembler.

Fixes #41
This commit is contained in:
Justine Tunney 2021-02-06 00:24:35 -08:00
parent e06c90fafc
commit d7733579d3
103 changed files with 384 additions and 359 deletions

View file

@ -51,10 +51,10 @@ static textwindows ssize_t sendfile_linux2nt(int outfd, int infd,
static ssize_t sendfile_linux2netflix(int outfd, int infd,
int64_t *inout_opt_inoffset,
size_t uptobytes) {
int sendfile$netflix(int32_t infd, int32_t outfd, int64_t offset,
size_t nbytes, const void *opt_hdtr,
int64_t *out_opt_sbytes,
int32_t flags) asm("sys_sendfile") hidden;
int sys_sendfile_netflix(int32_t infd, int32_t outfd, int64_t offset,
size_t nbytes, const void *opt_hdtr,
int64_t *out_opt_sbytes,
int32_t flags) asm("sys_sendfile") hidden;
int rc;
int64_t offset, sbytes;
if (inout_opt_inoffset) {
@ -62,8 +62,8 @@ static ssize_t sendfile_linux2netflix(int outfd, int infd,
} else if ((offset = sys_lseek(infd, 0, SEEK_CUR)) == -1) {
return -1;
}
if ((rc = sendfile$netflix(infd, outfd, offset, uptobytes, NULL, &sbytes,
0)) != -1) {
if ((rc = sys_sendfile_netflix(infd, outfd, offset, uptobytes, NULL, &sbytes,
0)) != -1) {
if (inout_opt_inoffset) *inout_opt_inoffset += sbytes;
return sbytes;
} else {