mirror of
git://git.musl-libc.org/musl
synced 2025-01-19 05:10:52 +00:00
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.
This commit is contained in:
parent
b4d94ba40d
commit
06bcf9bc94
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user