diff options
author | Matt Caswell <matt@openssl.org> | 2023-09-08 16:26:40 +0200 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-09-11 08:43:26 +0200 |
commit | 5d96106c43d5b4e2d97406e5d3934323ae5bd1b4 (patch) | |
tree | b06ebaa829c97d7e28de65d05a40a270cc546419 /crypto/bio/bss_dgram.c | |
parent | Prevent 80-test_cmp_http from accidentally killing perl in error. (diff) | |
download | openssl-5d96106c43d5b4e2d97406e5d3934323ae5bd1b4.tar.xz openssl-5d96106c43d5b4e2d97406e5d3934323ae5bd1b4.zip |
Fix a build failure where recvmmsg is available but not sendmmsg
Some old glibc versions have recvmmsg but not sendmmsg. We require both to
use that functionality. Introduce a test to check we have a sufficiently
recent version of glibc.
Fixes #22021
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/22036)
Diffstat (limited to 'crypto/bio/bss_dgram.c')
-rw-r--r-- | crypto/bio/bss_dgram.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c index b0c08b362a..3f57de539f 100644 --- a/crypto/bio/bss_dgram.c +++ b/crypto/bio/bss_dgram.c @@ -50,6 +50,17 @@ # define M_METHOD_RECVFROM 3 # define M_METHOD_WSARECVMSG 4 +# if defined(__GLIBC__) && defined(__GLIBC_PREREQ) +# if !(__GLIBC_PREREQ(2, 14)) +# undef NO_RECVMMSG + /* + * Some old glibc versions may have recvmmsg and MSG_WAITFORONE flag, but + * not sendmmsg. We need both so force this to be disabled on these old + * versions + */ +# define NO_RECVMMSG +# endif +# endif # if !defined(M_METHOD) # if defined(OPENSSL_SYS_WINDOWS) && defined(BIO_HAVE_WSAMSG) && !defined(NO_WSARECVMSG) # define M_METHOD M_METHOD_WSARECVMSG |