Klaus Demo nginx / 3693daa
Core: guard use of AI_ADDRCONFIG. Some systems (notably NetBSD and OpenBSD) lack AI_ADDRCONFIG support. Reported by Piotr Sikora. Ruslan Ermilov 8 years ago
2 changed file(s) with 4 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
787787 #include <netdb.h>"
788788 ngx_feature_path=
789789 ngx_feature_libs=
790 ngx_feature_test='struct addrinfo hints, *res;
791 hints.ai_family = AF_UNSPEC;
792 hints.ai_socktype = SOCK_STREAM;
793 hints.ai_flags = AI_ADDRCONFIG;
794 if (getaddrinfo("localhost", NULL, &hints, &res) != 0)
795 return 1;
790 ngx_feature_test='struct addrinfo *res;
791 if (getaddrinfo("localhost", NULL, NULL, &res) != 0) return 1;
796792 freeaddrinfo(res)'
797793 . auto/feature
962962 ngx_memzero(&hints, sizeof(struct addrinfo));
963963 hints.ai_family = AF_UNSPEC;
964964 hints.ai_socktype = SOCK_STREAM;
965 #ifdef AI_ADDRCONFIG
965966 hints.ai_flags = AI_ADDRCONFIG;
967 #endif
966968
967969 if (getaddrinfo((char *) host, NULL, &hints, &res) != 0) {
968970 u->err = "host not found";