summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/ipc/msgrcv.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libc-top-half/musl/src/ipc/msgrcv.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/ipc/msgrcv.c b/libc-top-half/musl/src/ipc/msgrcv.c
new file mode 100644
index 0000000..9d1034b
--- /dev/null
+++ b/libc-top-half/musl/src/ipc/msgrcv.c
@@ -0,0 +1,12 @@
+#include <sys/msg.h>
+#include "syscall.h"
+#include "ipc.h"
+
+ssize_t msgrcv(int q, void *m, size_t len, long type, int flag)
+{
+#ifndef SYS_ipc
+ return syscall_cp(SYS_msgrcv, q, m, len, type, flag);
+#else
+ return syscall_cp(SYS_ipc, IPCOP_msgrcv, q, len, flag, ((long[]){ (long)m, type }));
+#endif
+}