return 0;
}
'
+
+check_cc_snippet recvmmsg '
+#define _GNU_SOURCE
+#include <stdlib.h>
+#include <sys/socket.h>
+#define TEST test
+int test(void)
+{
+ recvmmsg(0, NULL, 0, 0, NULL);
+ return 0;
+}
+'
#
# Python
#
#include "http.h"
#include "satip_private.h"
+#ifndef CONFIG_RECVMMSG
+
+#ifdef __linux__
+
+/* define the syscall - works only for linux */
+
+#include <linux/unistd.h>
+
+struct mmsghdr {
+ struct msghdr msg_hdr;
+ unsigned int msg_len;
+};
+
+int recvmmsg(int sockfd, struct mmsghdr *msgvec, unsigned int vlen,
+ unsigned int flags, struct timespec *timeout);
+
+int recvmmsg(int sockfd, struct mmsghdr *msgvec, unsigned int vlen,
+ unsigned int flags, struct timespec *timeout)
+{
+ return syscall(__NR_recvmmsg, sockfd, msgvec, vlen, flags, timeout);
+}
+
+#else /* not __linux__ */
+
+#error "Add recvmmsg() support for your platform!!!"
+
+#endif
+
+#endif /* ENABLE_RECVMMSG */
+
static int
satip_frontend_tune1
( satip_frontend_t *lfe, mpegts_mux_instance_t *mmi );