1 #define _GNU_SOURCE
2 #include <sys/socket.h>
3 #include <limits.h>
4 #include "syscall.h"
5
recvmmsg(int fd,struct mmsghdr * msgvec,unsigned int vlen,unsigned int flags,struct timespec * timeout)6 int recvmmsg(int fd, struct mmsghdr *msgvec, unsigned int vlen, unsigned int flags, struct timespec *timeout)
7 {
8 #if LONG_MAX > INT_MAX
9 struct mmsghdr *mh = msgvec;
10 unsigned int i;
11 for (i = vlen; i; i--, mh++)
12 mh->msg_hdr.__pad1 = mh->msg_hdr.__pad2 = 0;
13 #endif
14 return syscall_cp(SYS_recvmmsg, fd, msgvec, vlen, flags, timeout);
15 }
16