summaryrefslogtreecommitdiffstats
path: root/src/channel.c
diff options
context:
space:
mode:
authorcions <gh.cions@gmail.com>2023-08-11 23:53:13 +0200
committerChristian Brabandt <cb@256bit.org>2023-08-11 23:53:13 +0200
commitdb4fd29063f940d2d15bbcd5e86e03b26c985222 (patch)
tree074fdb37d0af972a52ec6b1e1f0194d45643a686 /src/channel.c
parent7b7b4cb6f274e7bace127107b0d2752133c4020b (diff)
patch 9.0.1692: Android not handling AI_V4MAPPED ai_flagv9.0.1692
Problem: Android not handling AI_V4MAPPED ai_flag Solution: don't set AI_V4MAPPED flag when on Android, since Android's getaddrinfo returns EAI_BADFLAGS if ai_flags contains it closes: #12613 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: cions <gh.cions@gmail.com>
Diffstat (limited to 'src/channel.c')
-rw-r--r--src/channel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/channel.c b/src/channel.c
index 5d45ac6d14..cdb956e7cf 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -926,7 +926,9 @@ channel_open(
CLEAR_FIELD(hints);
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
-# if defined(AI_ADDRCONFIG) && defined(AI_V4MAPPED)
+# if defined(__ANDROID__)
+ hints.ai_flags = AI_ADDRCONFIG;
+# elif defined(AI_ADDRCONFIG) && defined(AI_V4MAPPED)
hints.ai_flags = AI_ADDRCONFIG | AI_V4MAPPED;
# endif
// Set port number manually in order to prevent name resolution services