Skip to content

Commit 44f9742

Browse files
Stub out SYS_recvmmsg syscall
1 parent 593c068 commit 44f9742

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

src/library_syscall.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,6 +1250,12 @@ var SyscallsLibrary = {
12501250
var stream = SYSCALLS.getStreamFromFD(), iov = SYSCALLS.get(), iovcnt = SYSCALLS.get(), offset = SYSCALLS.get();
12511251
return SYSCALLS.doWritev(stream, iov, iovcnt, offset);
12521252
},
1253+
__syscall337: function(which, varargs) { // recvmmsg
1254+
#if SYSCALL_DEBUG
1255+
Module.printErr('warning: ignoring SYS_recvmmsg');
1256+
#endif
1257+
return 0;
1258+
},
12531259
__syscall340: function(which, varargs) { // prlimit64
12541260
var pid = SYSCALLS.get(), resource = SYSCALLS.get(), new_limit = SYSCALLS.get(), old_limit = SYSCALLS.get();
12551261
if (old_limit) { // just report no limits
@@ -1602,6 +1608,7 @@ if (SYSCALL_DEBUG) {
16021608
SYS_inotify_init1: 332,
16031609
SYS_preadv: 333,
16041610
SYS_pwritev: 334,
1611+
SYS_recvmmsg: 337,
16051612
SYS_prlimit64: 340,
16061613
SYS_name_to_handle_at: 341,
16071614
SYS_open_by_handle_at: 342,

system/lib/libc/musl/arch/emscripten/bits/syscall.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@
333333
#define __NR_inotify_init1 332
334334
#define __NR_preadv 333
335335
#define __NR_pwritev 334
336+
#define __NR_recvmmsg 337
336337
#define __NR_prlimit64 340
337338
#define __NR_name_to_handle_at 341
338339
#define __NR_open_by_handle_at 342
@@ -683,6 +684,7 @@
683684
#define SYS_inotify_init1 332
684685
#define SYS_preadv 333
685686
#define SYS_pwritev 334
687+
#define SYS_recvmmsg 337
686688
#define SYS_prlimit64 340
687689
#define SYS_name_to_handle_at 341
688690
#define SYS_open_by_handle_at 342

system/lib/libc/musl/arch/emscripten/syscall_arch.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ long __syscall330(int which, ...);
141141
long __syscall331(int which, ...);
142142
long __syscall333(int which, ...);
143143
long __syscall334(int which, ...);
144+
long __syscall337(int which, ...);
144145
long __syscall340(int which, ...);
145146
long __syscall345(int which, ...);
146147

system/lib/libc/musl/src/network/recvmmsg.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,5 @@ int recvmmsg(int fd, struct mmsghdr *msgvec, unsigned int vlen, unsigned int fla
1111
for (i = vlen; i; i--, mh++)
1212
mh->msg_hdr.__pad1 = mh->msg_hdr.__pad2 = 0;
1313
#endif
14-
#ifndef __EMSCRIPTEN__
1514
return syscall_cp(SYS_recvmmsg, fd, msgvec, vlen, flags, timeout);
16-
#else
17-
return -1;
18-
#endif
1915
}

0 commit comments

Comments
 (0)