blob: ed4a448a7e5e4f2993f99649345b0850529f9563 [file] [log] [blame]
Rich Felker8bb82b42011-04-05 16:33:55 -04001#include <sys/msg.h>
2#include "syscall.h"
3#include "ipc.h"
4#include "libc.h"
5
6ssize_t msgrcv(int q, void *m, size_t len, long type, int flag)
7{
Rich Felkerc2cd25b2011-04-06 20:32:53 -04008#ifdef SYS_msgrcv
Rich Felkerfeee9892011-04-17 11:43:03 -04009 return syscall_cp(SYS_msgrcv, q, m, len, type, flag);
Rich Felker8bb82b42011-04-05 16:33:55 -040010#else
Rich Felkerfeee9892011-04-17 11:43:03 -040011 return syscall_cp(SYS_ipc, IPCOP_msgrcv, q, len, flag, ((long[]){ (long)m, type }));
Rich Felker8bb82b42011-04-05 16:33:55 -040012#endif
Rich Felker8bb82b42011-04-05 16:33:55 -040013}