patch 9.0.1692: Android not handling AI_V4MAPPED ai_flag

Commit: 
https://github.com/vim/vim/commit/db4fd29063f940d2d15bbcd5e86e03b26c985222
Author: cions <[email protected]>
Date:   Fri Aug 11 23:53:13 2023 +0200

    patch 9.0.1692: Android not handling AI_V4MAPPED ai_flag
    
    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 <[email protected]>
    Co-authored-by: cions <[email protected]>

diff --git a/src/channel.c b/src/channel.c
index 5d45ac6d1..cdb956e7c 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
diff --git a/src/version.c b/src/version.c
index f0ec4bc2d..1c528a30a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1692,
 /**/
     1691,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1qUaAw-00FDY8-Ux%40256bit.org.

Raspunde prin e-mail lui