summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYavor Georgiev <fealebenpae@gmail.com>2024-03-05 19:10:03 +0100
committerTomas Mraz <tomas@openssl.org>2024-03-22 17:00:08 +0100
commit3cbff861f3f7bfea4f7058433eba7a3c52f47fa0 (patch)
tree75315ba2b848f36902fa71b7460a2e23e4572383
parenta0c9382f6c179c60b7c67ab66168f077c900a9f4 (diff)
Don’t use the recvmmsg dgram method on Android <5
recvmmsg and sendmmsg were only added to Android’s C library in version 5, starting with API Level 21. Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23754) (cherry picked from commit 24109dca5a793d58c68a346db5b21746079ec317)
-rw-r--r--crypto/bio/bss_dgram.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c
index 01eaf43bed..ccfcb3dee2 100644
--- a/crypto/bio/bss_dgram.c
+++ b/crypto/bio/bss_dgram.c
@@ -66,6 +66,10 @@
#undef NO_RECVMSG
#define NO_RECVMSG
# endif
+# if defined(__ANDROID_API__) && __ANDROID_API__ < 21
+# undef NO_RECVMMSG
+# define NO_RECVMMSG
+# endif
# if !defined(M_METHOD)
# if defined(OPENSSL_SYS_WINDOWS) && defined(BIO_HAVE_WSAMSG) && !defined(NO_WSARECVMSG)
# define M_METHOD M_METHOD_WSARECVMSG