blob: 6fbc6364cb67d2394971a9eede949d5cf71fd847 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001The musl implementation of getaddrinfo and getservbyname does not
2aliases. As a workaround we use "sunprc" instead of "portmapper"
3
4ported from alpine linux
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05007Upstream-Status: Pending
Patrick Williamsc124f4f2015-09-15 14:41:29 -05008
9Index: rpcbind-0.2.2/src/rpcbind.c
10===================================================================
11--- rpcbind-0.2.2.orig/src/rpcbind.c
12+++ rpcbind-0.2.2/src/rpcbind.c
13@@ -491,7 +491,7 @@ init_transport(struct netconfig *nconf)
14 if ((aicode = getaddrinfo(hosts[nhostsbak],
15 servname, &hints, &res)) != 0) {
16 if ((aicode = getaddrinfo(hosts[nhostsbak],
17- "portmapper", &hints, &res)) != 0) {
18+ "sunrpc", &hints, &res)) != 0) {
19 syslog(LOG_ERR,
20 "cannot get local address for %s: %s",
21 nconf->nc_netid, gai_strerror(aicode));
22@@ -564,7 +564,7 @@ init_transport(struct netconfig *nconf)
23 if ((strcmp(nconf->nc_netid, "local") != 0) &&
24 (strcmp(nconf->nc_netid, "unix") != 0)) {
25 if ((aicode = getaddrinfo(NULL, servname, &hints, &res))!= 0) {
26- if ((aicode = getaddrinfo(NULL, "portmapper", &hints, &res))!= 0) {
27+ if ((aicode = getaddrinfo(NULL, "sunrpc", &hints, &res))!= 0) {
28 printf("cannot get local address for %s: %s", nconf->nc_netid, gai_strerror(aicode));
29 syslog(LOG_ERR,
30 "cannot get local address for %s: %s",