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>
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
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1692,
/**/
1691,
/**/