comparison src/channel.c @ 32745:52c1e2a4d014 v9.0.1692

patch 9.0.1692: Android not handling AI_V4MAPPED ai_flag Commit: https://github.com/vim/vim/commit/db4fd29063f940d2d15bbcd5e86e03b26c985222 Author: cions <gh.cions@gmail.com> 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 <cb@256bit.org> Co-authored-by: cions <gh.cions@gmail.com>
author Christian Brabandt <cb@256bit.org>
date Sat, 12 Aug 2023 00:00:06 +0200
parents 695b50472e85
children a60275d71dc2
comparison
equal deleted inserted replaced
32744:311ab7c902fa 32745:52c1e2a4d014
924 // socket address structure and connect to server. 924 // socket address structure and connect to server.
925 #ifdef FEAT_IPV6 925 #ifdef FEAT_IPV6
926 CLEAR_FIELD(hints); 926 CLEAR_FIELD(hints);
927 hints.ai_family = AF_UNSPEC; 927 hints.ai_family = AF_UNSPEC;
928 hints.ai_socktype = SOCK_STREAM; 928 hints.ai_socktype = SOCK_STREAM;
929 # if defined(AI_ADDRCONFIG) && defined(AI_V4MAPPED) 929 # if defined(__ANDROID__)
930 hints.ai_flags = AI_ADDRCONFIG;
931 # elif defined(AI_ADDRCONFIG) && defined(AI_V4MAPPED)
930 hints.ai_flags = AI_ADDRCONFIG | AI_V4MAPPED; 932 hints.ai_flags = AI_ADDRCONFIG | AI_V4MAPPED;
931 # endif 933 # endif
932 // Set port number manually in order to prevent name resolution services 934 // Set port number manually in order to prevent name resolution services
933 // from being invoked in the environment where AI_NUMERICSERV is not 935 // from being invoked in the environment where AI_NUMERICSERV is not
934 // defined. 936 // defined.