提交 06bcf9bc 编写于 作者: R Rich Felker

make getaddrinfo return error if both host and service name are null

this case is specified as a mandatory ("shall fail") error.

based on patch by Julien Ramseier.
上级 b4d94ba4
......@@ -20,6 +20,8 @@ int getaddrinfo(const char *restrict host, const char *restrict serv, const stru
} sa;
} *out;
if (!host && !serv) return EAI_NONAME;
if (hint) {
family = hint->ai_family;
flags = hint->ai_flags;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册