about summary refs log tree commit diff
path: root/src/network/recvmmsg.c
blob: 58b1b2f635bdeba487f361acc9f0cc3a75e018aa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#define _GNU_SOURCE
#include <sys/socket.h>
#include <limits.h>
#include "syscall.h"

int recvmmsg(int fd, struct mmsghdr *msgvec, unsigned int vlen, unsigned int flags, struct timespec *timeout)
{
#if LONG_MAX > INT_MAX
	struct mmsghdr *mh = msgvec;
	unsigned int i;
	for (i = vlen; i; i--, mh++)
		mh->msg_hdr.__pad1 = mh->msg_hdr.__pad2 = 0;
#endif
	return syscall_cp(SYS_recvmmsg, fd, msgvec, vlen, flags, timeout);
}