diff --git a/src/lib/libsigs.js b/src/lib/libsigs.js index 60dce773943be..b7c6de207248b 100644 --- a/src/lib/libsigs.js +++ b/src/lib/libsigs.js @@ -231,10 +231,10 @@ sigs = { __pthread_create_js__sig: 'ipppp', __resumeException__sig: 'vp', __syscall_accept4__sig: 'iippiii', - __syscall_bind__sig: 'iippiii', + __syscall_bind__sig: 'iipiiii', __syscall_chdir__sig: 'ip', __syscall_chmod__sig: 'ipi', - __syscall_connect__sig: 'iippiii', + __syscall_connect__sig: 'iipiiii', __syscall_dup__sig: 'ii', __syscall_dup3__sig: 'iiii', __syscall_faccessat__sig: 'iipii', @@ -265,12 +265,12 @@ sigs = { __syscall_poll__sig: 'ipii', __syscall_poll_nonblocking__sig: 'ipi', __syscall_readlinkat__sig: 'iippp', - __syscall_recvfrom__sig: 'iippipp', - __syscall_recvmsg__sig: 'iipiiii', + __syscall_recvfrom__sig: 'pippipp', + __syscall_recvmsg__sig: 'pipiiii', __syscall_renameat__sig: 'iipip', __syscall_rmdir__sig: 'ip', - __syscall_sendmsg__sig: 'iipippi', - __syscall_sendto__sig: 'iippipp', + __syscall_sendmsg__sig: 'pipippi', + __syscall_sendto__sig: 'pippipi', __syscall_shutdown__sig: 'iiiiiii', __syscall_socket__sig: 'iiiiiii', __syscall_stat64__sig: 'ipp', diff --git a/system/include/emscripten/syscalls.h b/system/include/emscripten/syscalls.h index 336d6a8d5ddd3..521d65db58d46 100644 --- a/system/include/emscripten/syscalls.h +++ b/system/include/emscripten/syscalls.h @@ -7,8 +7,10 @@ #pragma once +#include #include #include +#include #include #ifdef __cplusplus @@ -16,42 +18,42 @@ extern "C" { #endif int __syscall_chdir(intptr_t path); -int __syscall_mknod(intptr_t path, int mode, int dev); -int __syscall_chmod(intptr_t path, int mode); -int __syscall_getpid(void); +int __syscall_mknod(intptr_t path, mode_t mode, dev_t dev); +int __syscall_chmod(intptr_t path, mode_t mode); +pid_t __syscall_getpid(void); int __syscall_access(intptr_t path, int amode); int __syscall_sync(void); int __syscall_rmdir(intptr_t path); int __syscall_dup(int fd); int __syscall_acct(intptr_t filename); int __syscall_ioctl(int fd, int request, ...); -int __syscall_setpgid(int pid, int gpid); -int __syscall_umask(int mask); -int __syscall_getppid(void); -int __syscall_getpgrp(void); -int __syscall_setsid(void); +int __syscall_setpgid(pid_t pid, pid_t gpid); +mode_t __syscall_umask(mode_t mask); +pid_t __syscall_getppid(void); +pid_t __syscall_getpgrp(void); +pid_t __syscall_setsid(void); int __syscall_getrusage(int who, intptr_t usage); int __syscall_munmap(intptr_t addr, size_t len); -int __syscall_fchmod(int fd, int mode); -int __syscall_getpriority(int which, int who); -int __syscall_setpriority(int which, int who, int prio); +int __syscall_fchmod(int fd, mode_t mode); +int __syscall_getpriority(int which, id_t who); +int __syscall_setpriority(int which, id_t who, int prio); int __syscall_socketcall(int call, intptr_t args); -int __syscall_wait4(int pid, intptr_t wstatus, int options, int rusage); +pid_t __syscall_wait4(pid_t pid, intptr_t wstatus, int options, int rusage); int __syscall_setdomainname(intptr_t name, size_t size); int __syscall_uname(intptr_t buf); int __syscall_mprotect(size_t addr, size_t len, int prot); -int __syscall_getpgid(int pid); +pid_t __syscall_getpgid(pid_t pid); int __syscall_fchdir(int fd); int __syscall_msync(intptr_t addr, size_t len, int flags); -int __syscall_getsid(int pid); +pid_t __syscall_getsid(pid_t pid); int __syscall_fdatasync(int fd); int __syscall_mlock(intptr_t addr, size_t len); int __syscall_munlock(intptr_t addr, size_t len); int __syscall_mlockall(int flags); int __syscall_munlockall(void); int __syscall_mremap(intptr_t old_addr, size_t old_size, size_t new_size, int flags, intptr_t new_addr); -int __syscall_poll(intptr_t fds, int nfds, int timeout); -int __syscall_poll_nonblocking(intptr_t fds, int nfds); +int __syscall_poll(intptr_t fds, nfds_t nfds, int timeout); +int __syscall_poll_nonblocking(intptr_t fds, nfds_t nfds); int __syscall_getcwd(intptr_t buf, size_t size); intptr_t __syscall_mmap2(intptr_t addr, size_t len, int prot, int flags, int fd, off_t offset); int __syscall_truncate64(intptr_t path, off_t length); @@ -59,20 +61,20 @@ int __syscall_ftruncate64(int fd, off_t length); int __syscall_stat64(intptr_t path, intptr_t buf); int __syscall_lstat64(intptr_t path, intptr_t buf); int __syscall_fstat64(int fd, intptr_t buf); -int __syscall_getuid32(void); -int __syscall_getgid32(void); -int __syscall_geteuid32(void); -int __syscall_getegid32(void); -int __syscall_setreuid32(int ruid, int euid); -int __syscall_setregid32(int rgid, int egid); -int __syscall_getgroups32(int size, intptr_t list); -int __syscall_fchown32(int fd, int owner, int group); -int __syscall_setresuid32(int ruid, int euid, int suid); +uid_t __syscall_getuid32(void); +gid_t __syscall_getgid32(void); +uid_t __syscall_geteuid32(void); +gid_t __syscall_getegid32(void); +int __syscall_setreuid32(uid_t ruid, uid_t euid); +int __syscall_setregid32(gid_t rgid, gid_t egid); +int __syscall_getgroups32(int count, intptr_t list); +int __syscall_fchown32(int fd, uid_t owner, gid_t group); +int __syscall_setresuid32(uid_t ruid, uid_t euid, uid_t suid); int __syscall_getresuid32(intptr_t ruid, intptr_t euid, intptr_t suid); -int __syscall_setresgid32(int rgid, int egid, int sgid); +int __syscall_setresgid32(gid_t rgid, gid_t egid, gid_t sgid); int __syscall_getresgid32(intptr_t rgid, intptr_t egid, intptr_t sgid); -int __syscall_setuid32(int uid); -int __syscall_setgid32(int uid); +int __syscall_setuid32(uid_t uid); +int __syscall_setgid32(gid_t gid); int __syscall_mincore(intptr_t addr, size_t length, intptr_t vec); int __syscall_madvise(intptr_t addr, size_t length, int advice); int __syscall_getdents64(int fd, intptr_t dirp, size_t count); @@ -81,38 +83,38 @@ int __syscall_statfs64(intptr_t path, size_t size, intptr_t buf); int __syscall_fstatfs64(int fd, size_t size, intptr_t buf); int __syscall_fadvise64(int fd, off_t offset, off_t length, int advice); int __syscall_openat(int dirfd, intptr_t path, int flags, ...); // mode is optional -int __syscall_mkdirat(int dirfd, intptr_t path, int mode); -int __syscall_mknodat(int dirfd, intptr_t path, int mode, int dev); -int __syscall_fchownat(int dirfd, intptr_t path, int owner, int group, int flags); +int __syscall_mkdirat(int dirfd, intptr_t path, mode_t mode); +int __syscall_mknodat(int dirfd, intptr_t path, mode_t mode, dev_t dev); +int __syscall_fchownat(int dirfd, intptr_t path, uid_t owner, gid_t group, int flags); int __syscall_newfstatat(int dirfd, intptr_t path, intptr_t buf, int flags); int __syscall_unlinkat(int dirfd, intptr_t path, int flags); int __syscall_renameat(int olddirfd, intptr_t oldpath, int newdirfd, intptr_t newpath); int __syscall_linkat(int olddirfd, intptr_t oldpath, int newdirfd, intptr_t newpath, int flags); int __syscall_symlinkat(intptr_t target, int newdirfd, intptr_t linkpath); int __syscall_readlinkat(int dirfd, intptr_t path, intptr_t buf, size_t bufsize); -int __syscall_fchmodat2(int dirfd, intptr_t path, int mode, int flags); +int __syscall_fchmodat2(int dirfd, intptr_t path, mode_t mode, int flags); int __syscall_faccessat(int dirfd, intptr_t path, int amode, int flags); int __syscall_utimensat(int dirfd, intptr_t path, intptr_t times, int flags); int __syscall_fallocate(int fd, int mode, off_t offset, off_t len); int __syscall_dup3(int fd, int suggestfd, int flags); int __syscall_pipe2(intptr_t fds, int flags); -int __syscall_recvmmsg(int sockfd, intptr_t msgvec, size_t vlen, int flags, ...); -int __syscall_prlimit64(int pid, int resource, intptr_t new_limit, intptr_t old_limit); -int __syscall_sendmmsg(int sockfd, intptr_t msgvec, size_t vlen, int flags, ...); +int __syscall_recvmmsg(int sockfd, intptr_t msgvec, unsigned int vlen, unsigned int flags, ...); +int __syscall_prlimit64(pid_t pid, int resource, intptr_t new_limit, intptr_t old_limit); +int __syscall_sendmmsg(int sockfd, intptr_t msgvec, unsigned int vlen, unsigned int flags, ...); int __syscall_socket(int domain, int type, int protocol, int dummy1, int dummy2, int dummy3); int __syscall_socketpair(int domain, int type, int protocol, intptr_t fds, int dummy, int dummy2); -int __syscall_bind(int sockfd, intptr_t addr, size_t alen, int dummy, int dummy2, int dummy3); -int __syscall_connect(int sockfd, intptr_t addr, size_t len, int dummy, int dummy2, int dummy3); +int __syscall_bind(int sockfd, intptr_t addr, socklen_t alen, int dummy, int dummy2, int dummy3); +int __syscall_connect(int sockfd, intptr_t addr, socklen_t len, int dummy, int dummy2, int dummy3); int __syscall_listen(int sockfd, int backlog, int dummy1, int dummy2, int dummy3, int dummy4); int __syscall_accept4(int sockfd, intptr_t addr, intptr_t addrlen, int flags, int dummy1, int dummy2); int __syscall_getsockopt(int sockfd, int level, int optname, intptr_t optval, intptr_t optlen, int dummy); -int __syscall_setsockopt(int sockfd, int level, int optname, intptr_t optval, size_t optlen, int dummy); +int __syscall_setsockopt(int sockfd, int level, int optname, intptr_t optval, socklen_t optlen, int dummy); int __syscall_getsockname(int sockfd, intptr_t addr, intptr_t len, int dummy, int dummy2, int dummy3); int __syscall_getpeername(int sockfd, intptr_t addr, intptr_t len, int dummy, int dummy2, int dummy3); -int __syscall_sendto(int sockfd, intptr_t msg, size_t len, int flags, intptr_t addr, size_t alen); -int __syscall_sendmsg(int sockfd, intptr_t msg , int flags, intptr_t addr, size_t alen, int dummy); -int __syscall_recvfrom(int sockfd, intptr_t msg, size_t len, int flags, intptr_t addr, intptr_t alen); -int __syscall_recvmsg(int sockfd, intptr_t msg, int flags, int dummy, int dummy2, int dummy3); +ssize_t __syscall_sendto(int sockfd, intptr_t msg, size_t len, int flags, intptr_t addr, socklen_t alen); +ssize_t __syscall_sendmsg(int sockfd, intptr_t msg , int flags, intptr_t addr, size_t alen, int dummy); +ssize_t __syscall_recvfrom(int sockfd, intptr_t msg, size_t len, int flags, intptr_t addr, intptr_t alen); +ssize_t __syscall_recvmsg(int sockfd, intptr_t msg, int flags, int dummy, int dummy2, int dummy3); int __syscall_shutdown(int sockfd, int how, int dummy, int dummy2, int dummy3, int dummy4); #ifdef __cplusplus diff --git a/system/lib/libc/emscripten_syscall_stubs.c b/system/lib/libc/emscripten_syscall_stubs.c index 13ec599a8ee45..0bb85ba497e81 100644 --- a/system/lib/libc/emscripten_syscall_stubs.c +++ b/system/lib/libc/emscripten_syscall_stubs.c @@ -25,10 +25,10 @@ #include #include -static int g_pid = 42; -static int g_pgid = 42; -static int g_ppid = 1; -static int g_sid = 42; +static pid_t g_pid = 42; +static pid_t g_pgid = 42; +static pid_t g_ppid = 1; +static pid_t g_sid = 42; #ifdef NDEBUG #define REPORT(name) @@ -68,7 +68,7 @@ weak int __syscall_uname(intptr_t buf) { return 0; } -weak int __syscall_setpgid(int pid, int pgid) { +weak int __syscall_setpgid(pid_t pid, pid_t pgid) { if (pid && pid != g_pid) { return -ESRCH; } @@ -82,25 +82,25 @@ weak int __syscall_sync() { return 0; } -weak int __syscall_getsid(int pid) { +weak pid_t __syscall_getsid(pid_t pid) { if (pid && pid != g_pid) { return -ESRCH; } return g_sid; } -weak int __syscall_getpgid(int pid) { +weak pid_t __syscall_getpgid(pid_t pid) { if (pid && pid != g_pid) { return -ESRCH; } return g_pgid; } -weak int __syscall_getpid() { +weak pid_t __syscall_getpid() { return g_pid; } -weak int __syscall_getppid() { +weak pid_t __syscall_getppid() { return g_ppid; } @@ -108,15 +108,15 @@ weak int __syscall_linkat(int olddirfd, intptr_t oldpath, int newdirfd, intptr_t return -EMLINK; // no hardlinks for us } -weak int __syscall_getgroups32(int size, intptr_t list) { - if (size < 1) { +weak int __syscall_getgroups32(int count, intptr_t list) { + if (count < 1) { return -EINVAL; } ((gid_t*)list)[0] = 0; return 1; } -weak int __syscall_setsid() { +weak pid_t __syscall_setsid() { return 0; // no-op } @@ -137,11 +137,11 @@ weak int __syscall_getrusage(int who, intptr_t usage) { return 0; } -weak int __syscall_getpriority(int which, int who) { +weak int __syscall_getpriority(int which, id_t who) { return 0; } -weak int __syscall_setpriority(int which, int who, int prio) { +weak int __syscall_setpriority(int which, id_t who, int prio) { return -EPERM; } @@ -149,19 +149,19 @@ weak int __syscall_setdomainname(intptr_t name, size_t size) { return -EPERM; } -weak int __syscall_getuid32(void) { +weak uid_t __syscall_getuid32(void) { return 0; } -weak int __syscall_getgid32(void) { +weak gid_t __syscall_getgid32(void) { return 0; } -weak int __syscall_geteuid32(void) { +weak uid_t __syscall_geteuid32(void) { return 0; } -weak int __syscall_getegid32(void) { +weak gid_t __syscall_getegid32(void) { return 0; } @@ -221,7 +221,7 @@ weak int __syscall_munlockall() { return 0; } -weak int __syscall_prlimit64(int pid, int resource, intptr_t new_limit, intptr_t old_limit) { +weak int __syscall_prlimit64(pid_t pid, int resource, intptr_t new_limit, intptr_t old_limit) { REPORT(prlimit64); struct rlimit *old = (struct rlimit *)old_limit; if (new_limit) { @@ -248,15 +248,19 @@ weak int __syscall_prlimit64(int pid, int resource, intptr_t new_limit, intptr_t return 0; } -weak int __syscall_setsockopt(int sockfd, int level, int optname, intptr_t optval, size_t optlen, int dummy) { +weak int __syscall_setsockopt(int sockfd, int level, int optname, intptr_t optval, socklen_t optlen, int dummy) { REPORT(setsockopt); return -ENOPROTOOPT; // The option is unknown at the level indicated. } +weak pid_t __syscall_wait4(pid_t pid, intptr_t wstatus, int options, int rusage) { + REPORT(wait4); + return (pid_t)-1; +} + UNIMPLEMENTED(acct, (intptr_t filename)) UNIMPLEMENTED(mincore, (intptr_t addr, size_t length, intptr_t vec)) -UNIMPLEMENTED(recvmmsg, (int sockfd, intptr_t msgvec, size_t vlen, int flags, ...)) -UNIMPLEMENTED(sendmmsg, (int sockfd, intptr_t msgvec, size_t vlen, int flags, ...)) +UNIMPLEMENTED(recvmmsg, (int sockfd, intptr_t msgvec, unsigned int vlen, unsigned int flags, ...)) +UNIMPLEMENTED(sendmmsg, (int sockfd, intptr_t msgvec, unsigned int vlen, unsigned int flags, ...)) UNIMPLEMENTED(shutdown, (int sockfd, int how, int dummy, int dummy2, int dummy3, int dummy4)) UNIMPLEMENTED(socketpair, (int domain, int type, int protocol, intptr_t fds, int dummy, int dummy2)) -UNIMPLEMENTED(wait4,(int pid, intptr_t wstatus, int options, int rusage)) diff --git a/system/lib/standalone/standalone.c b/system/lib/standalone/standalone.c index c5b0b40729d9a..2576fd8665fec 100644 --- a/system/lib/standalone/standalone.c +++ b/system/lib/standalone/standalone.c @@ -66,11 +66,11 @@ weak int _munmap_js( return -ENOSYS; } -weak int __syscall_poll(intptr_t fds, int nfds, int timeout) { +weak int __syscall_poll(intptr_t fds, nfds_t nfds, int timeout) { return -ENOSYS; } -weak int __syscall_poll_nonblocking(intptr_t fds, int nfds) { +weak int __syscall_poll_nonblocking(intptr_t fds, nfds_t nfds) { return -ENOSYS; } @@ -111,7 +111,7 @@ weak int __syscall_dup(int fd) { return -ENOSYS; } -weak int __syscall_mkdirat(int dirfd, intptr_t path, int mode) { +weak int __syscall_mkdirat(int dirfd, intptr_t path, mode_t mode) { return -ENOSYS; } diff --git a/system/lib/wasmfs/js_api.cpp b/system/lib/wasmfs/js_api.cpp index 5330b66b4074a..9b3ef3c233cdd 100644 --- a/system/lib/wasmfs/js_api.cpp +++ b/system/lib/wasmfs/js_api.cpp @@ -114,7 +114,7 @@ int _wasmfs_write_file(const char* pathname, const uint8_t* data, size_t data_si return data_size; } -int _wasmfs_mkdir(const char* path, int mode) { +int _wasmfs_mkdir(const char* path, mode_t mode) { return __syscall_mkdirat(AT_FDCWD, (intptr_t)path, mode); } diff --git a/system/lib/wasmfs/syscalls.cpp b/system/lib/wasmfs/syscalls.cpp index 95babec3cec1f..25978bcf9eea4 100644 --- a/system/lib/wasmfs/syscalls.cpp +++ b/system/lib/wasmfs/syscalls.cpp @@ -582,7 +582,7 @@ int __syscall_openat(int dirfd, intptr_t path, int flags, ...) { return doOpen(path::parseParent((char*)path, dirfd), flags, mode); } -int __syscall_mknodat(int dirfd, intptr_t path, int mode, int dev) { +int __syscall_mknodat(int dirfd, intptr_t path, mode_t mode, dev_t dev) { assert(dev == 0); // TODO: support special devices if (mode & S_IFDIR) { return -EINVAL; @@ -598,7 +598,7 @@ int __syscall_mknodat(int dirfd, intptr_t path, int mode, int dev) { } static int -doMkdir(path::ParsedParent parsed, int mode, backend_t backend = NullBackend) { +doMkdir(path::ParsedParent parsed, mode_t mode, backend_t backend = NullBackend) { if (auto err = parsed.getError()) { return err; } @@ -656,18 +656,18 @@ doMkdir(path::ParsedParent parsed, int mode, backend_t backend = NullBackend) { // This function is exposed to users and allows users to specify a particular // backend that a directory should be created within. -int wasmfs_create_directory(char* path, int mode, backend_t backend) { +int wasmfs_create_directory(char* path, mode_t mode, backend_t backend) { static_assert(std::is_same_v, "unexpected conversion from result of doMkdir to int"); return doMkdir(path::parseParent(path), mode, backend); } // TODO: Test this. -int __syscall_mkdirat(int dirfd, intptr_t path, int mode) { +int __syscall_mkdirat(int dirfd, intptr_t path, mode_t mode) { return doMkdir(path::parseParent((char*)path, dirfd), mode); } -int __syscall_umask(int mask) { +mode_t __syscall_umask(mode_t mask) { mode_t old = wasmFS.getUmask(); wasmFS.setUmask(mask); return old; @@ -1172,7 +1172,7 @@ int __syscall_utimensat(int dirFD, intptr_t path_, intptr_t times_, int flags) { } // TODO: Test this with non-AT_FDCWD values. -int __syscall_fchmodat2(int dirfd, intptr_t path, int mode, int flags) { +int __syscall_fchmodat2(int dirfd, intptr_t path, mode_t mode, int flags) { if (flags & ~AT_SYMLINK_NOFOLLOW) { // TODO: Test this case. return -EINVAL; @@ -1188,11 +1188,11 @@ int __syscall_fchmodat2(int dirfd, intptr_t path, int mode, int flags) { return 0; } -int __syscall_chmod(intptr_t path, int mode) { +int __syscall_chmod(intptr_t path, mode_t mode) { return __syscall_fchmodat2(AT_FDCWD, path, mode, 0); } -int __syscall_fchmod(int fd, int mode) { +int __syscall_fchmod(int fd, mode_t mode) { auto openFile = wasmFS.getFileTable().locked().getEntry(fd); if (!openFile) { return -EBADF; @@ -1204,7 +1204,7 @@ int __syscall_fchmod(int fd, int mode) { } int __syscall_fchownat( - int dirfd, intptr_t path, int owner, int group, int flags) { + int dirfd, intptr_t path, uid_t owner, gid_t group, int flags) { // Only accept valid flags. if (flags & ~(AT_EMPTY_PATH | AT_SYMLINK_NOFOLLOW)) { // TODO: Test this case. @@ -1220,7 +1220,7 @@ int __syscall_fchownat( return 0; } -int __syscall_fchown32(int fd, int owner, int group) { +int __syscall_fchown32(int fd, uid_t owner, gid_t group) { return __syscall_fchownat(fd, (intptr_t) "", owner, group, AT_EMPTY_PATH); } @@ -1385,7 +1385,7 @@ int __syscall_pipe2(intptr_t fd, int flags) { } // int poll(struct pollfd* fds, nfds_t nfds, int timeout); -int __syscall_poll(intptr_t fds_, int nfds, int timeout) { +int __syscall_poll(intptr_t fds_, nfds_t nfds, int timeout) { struct pollfd* fds = (struct pollfd*)fds_; auto fileTable = wasmFS.getFileTable().locked(); @@ -1438,7 +1438,7 @@ int __syscall_poll(intptr_t fds_, int nfds, int timeout) { // libc routes zero-timeout poll() calls here (see musl's poll.c). WasmFS's // __syscall_poll never blocks, so the zero-timeout probe is the same call. -int __syscall_poll_nonblocking(intptr_t fds, int nfds) { +int __syscall_poll_nonblocking(intptr_t fds, nfds_t nfds) { return __syscall_poll(fds, nfds, 0); } @@ -1731,12 +1731,12 @@ int __syscall_accept4(int sockfd, } int __syscall_bind( - int sockfd, intptr_t addr, size_t alen, int dummy, int dummy2, int dummy3) { + int sockfd, intptr_t addr, socklen_t alen, int dummy, int dummy2, int dummy3) { return -ENOSYS; } int __syscall_connect( - int sockfd, intptr_t addr, size_t len, int dummy, int dummy2, int dummy3) { + int sockfd, intptr_t addr, socklen_t len, int dummy, int dummy2, int dummy3) { return -ENOSYS; } @@ -1769,26 +1769,26 @@ int __syscall_getpeername( return -ENOSYS; } -int __syscall_sendto( - int sockfd, intptr_t msg, size_t len, int flags, intptr_t addr, size_t alen) { +ssize_t __syscall_sendto( + int sockfd, intptr_t msg, size_t len, int flags, intptr_t addr, socklen_t alen) { return -ENOSYS; } -int __syscall_sendmsg( +ssize_t __syscall_sendmsg( int sockfd, intptr_t msg, int flags, intptr_t addr, size_t alen, int dummy) { return -ENOSYS; } -int __syscall_recvfrom(int sockfd, - intptr_t msg, - size_t len, - int flags, - intptr_t addr, - intptr_t alen) { +ssize_t __syscall_recvfrom(int sockfd, + intptr_t msg, + size_t len, + int flags, + intptr_t addr, + intptr_t alen) { return -ENOSYS; } -int __syscall_recvmsg( +ssize_t __syscall_recvmsg( int sockfd, intptr_t msg, int flags, int dummy, int dummy2, int dummy3) { return -ENOSYS; } diff --git a/test/codesize/test_codesize_hello_dylink_all.json b/test/codesize/test_codesize_hello_dylink_all.json index 584a099573a66..fde777a4819d0 100644 --- a/test/codesize/test_codesize_hello_dylink_all.json +++ b/test/codesize/test_codesize_hello_dylink_all.json @@ -1,7 +1,7 @@ { "a.out.js": 268274, - "a.out.nodebug.wasm": 587640, - "total": 855914, + "a.out.nodebug.wasm": 587670, + "total": 855944, "sent": [ "IMG_Init", "IMG_Load", @@ -5324,9 +5324,11 @@ "$vwarnx", "$vwprintf", "$vwscanf", + "$wait", "$wait3", "$wait4", "$waitid", + "$waitpid", "$walk", "$warn", "$warnx",