Skip to content
Snippets Groups Projects
Commit 689f54ef authored by Marek Vavrusa's avatar Marek Vavrusa
Browse files

Fixed name clash with existing sendmmsg() call.

parent 7293e2f1
Branches
Tags
No related merge requests found
......@@ -138,7 +138,7 @@ AC_DEFINE([DSFMT_MEXP], [521], [DSFMT parameters.])
# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_MMAP
AC_CHECK_FUNCS([gethostbyname gettimeofday clock_gettime memalign memmove memset munmap regcomp pselect select socket sqrt strcasecmp strchr strdup strerror strncasecmp strtol strtoul poll epoll_wait kqueue setgroups])
AC_CHECK_FUNCS([gethostbyname gettimeofday clock_gettime memalign memmove memset munmap regcomp pselect select socket sqrt strcasecmp strchr strdup strerror strncasecmp strtol strtoul poll epoll_wait kqueue setgroups sendmmsg])
AC_CONFIG_FILES([Makefile
samples/Makefile
......
......@@ -49,8 +49,12 @@
#include "knot/server/notify.h"
/* Check for sendmmsg syscall. */
#ifdef SYS_sendmmsg
#define ENABLE_SENDMMSG 1
#ifdef HAVE_SENDMMSG
#define ENABLE_SENDMMSG 1
#else
#ifdef SYS_sendmmsg
#define ENABLE_SENDMMSG 1
#endif
#endif
/*! \brief Pointer to selected UDP master implementation. */
......@@ -296,11 +300,13 @@ int udp_sendto(int sock, sockaddr_t * addrs, struct mmsghdr *msgs, size_t count)
#ifdef ENABLE_SENDMMSG
/*! \brief sendmmsg() syscall interface. */
#ifndef HAVE_SENDMMSG
static inline int sendmmsg(int fd, struct mmsghdr *mmsg, unsigned vlen,
unsigned flags)
{
return syscall(SYS_sendmmsg, fd, mmsg, vlen, flags, NULL);
}
#endif
/*!
* \brief Send multiple packets.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment