quic: use send/recvmmsg when available

add checks for sendmmsg in configure and CmakeLists.txt for enabling use
of these functions in ngtcp2/quiche quic.

Closes #14880
This commit is contained in:
Stefan Eissing 2024-09-12 12:24:42 +02:00 committed by Daniel Stenberg
parent 876f17ad24
commit 97c0f89bd0
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
7 changed files with 24 additions and 12 deletions

View file

@ -463,6 +463,9 @@
/* Define to 1 if you have the sendmsg function. */
#cmakedefine HAVE_SENDMSG 1
/* Define to 1 if you have the sendmmsg function. */
#cmakedefine HAVE_SENDMMSG 1
/* Define to 1 if you have the 'fsetxattr' function. */
#cmakedefine HAVE_FSETXATTR 1

View file

@ -208,6 +208,11 @@
/* please, do it beyond the point further indicated in this file. */
/* ================================================================ */
/* Give calloc a chance to be dragging in early, so we do not redefine */
#if defined(USE_THREADS_POSIX) && defined(HAVE_PTHREAD_H)
# include <pthread.h>
#endif
/*
* Disable other protocols when http is the only one desired.
*/

View file

@ -22,18 +22,6 @@
*
***************************************************************************/
/* WIP, experimental: use recvmmsg() on Linux
* we have no configure check, yet
* and also it is only available for _GNU_SOURCE, which
* we do not use otherwise.
#define HAVE_SENDMMSG
*/
#if defined(HAVE_SENDMMSG)
#define _GNU_SOURCE
#include <sys/socket.h>
#undef _GNU_SOURCE
#endif
#include "curl_setup.h"
#ifdef HAVE_NETINET_UDP_H