summaryrefslogtreecommitdiff
path: root/src/network/getservbyname_r.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2015-02-07 14:01:34 -0500
committerRich Felker <dalias@aerifal.cx>2015-02-07 14:01:34 -0500
commitc63c98a6067030a25a42703db1209ccbcc74803a (patch)
tree7ffaee240a0cf9286d851a1681d974878b2cf091 /src/network/getservbyname_r.c
parente63833cd43a778f639e4fdf5d86cd5c526cc5db2 (diff)
downloadmusl-c63c98a6067030a25a42703db1209ccbcc74803a.tar.gz
musl-c63c98a6067030a25a42703db1209ccbcc74803a.tar.bz2
musl-c63c98a6067030a25a42703db1209ccbcc74803a.tar.xz
musl-c63c98a6067030a25a42703db1209ccbcc74803a.zip
make getaddrinfo support SOCK_RAW and other socket types
all socket types are accepted at this point, but that may be changed at a later time if the behavior is not meaningful for other types. as before, omitting type (a value of 0) gives both UDP and TCP results, and SOCK_DGRAM or SOCK_STREAM restricts to UDP or TCP, respectively. for other socket types, the service name argument is required to be a null pointer, and the protocol number provided by the caller is used.
Diffstat (limited to 'src/network/getservbyname_r.c')
-rw-r--r--src/network/getservbyname_r.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/getservbyname_r.c b/src/network/getservbyname_r.c
index 8cdf622c..056c2f33 100644
--- a/src/network/getservbyname_r.c
+++ b/src/network/getservbyname_r.c
@@ -26,7 +26,7 @@ int getservbyname_r(const char *name, const char *prots,
else if (!strcmp(prots, "udp")) proto = IPPROTO_UDP;
else return EINVAL;
- cnt = __lookup_serv(servs, name, proto, 0);
+ cnt = __lookup_serv(servs, name, proto, 0, 0);
if (cnt<0) switch (cnt) {
case EAI_MEMORY:
case EAI_SYSTEM: