diff options
Diffstat (limited to 'meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch')
-rw-r--r-- | meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch b/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch new file mode 100644 index 0000000000..9c72a1bdf4 --- /dev/null +++ b/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | The musl implementation of getaddrinfo and getservbyname does not | ||
2 | aliases. As a workaround we use "sunprc" instead of "portmapper" | ||
3 | |||
4 | ported from alpine linux | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Index: rpcbind-0.2.2/src/rpcbind.c | ||
9 | =================================================================== | ||
10 | --- rpcbind-0.2.2.orig/src/rpcbind.c | ||
11 | +++ rpcbind-0.2.2/src/rpcbind.c | ||
12 | @@ -491,7 +491,7 @@ init_transport(struct netconfig *nconf) | ||
13 | if ((aicode = getaddrinfo(hosts[nhostsbak], | ||
14 | servname, &hints, &res)) != 0) { | ||
15 | if ((aicode = getaddrinfo(hosts[nhostsbak], | ||
16 | - "portmapper", &hints, &res)) != 0) { | ||
17 | + "sunrpc", &hints, &res)) != 0) { | ||
18 | syslog(LOG_ERR, | ||
19 | "cannot get local address for %s: %s", | ||
20 | nconf->nc_netid, gai_strerror(aicode)); | ||
21 | @@ -564,7 +564,7 @@ init_transport(struct netconfig *nconf) | ||
22 | if ((strcmp(nconf->nc_netid, "local") != 0) && | ||
23 | (strcmp(nconf->nc_netid, "unix") != 0)) { | ||
24 | if ((aicode = getaddrinfo(NULL, servname, &hints, &res))!= 0) { | ||
25 | - if ((aicode = getaddrinfo(NULL, "portmapper", &hints, &res))!= 0) { | ||
26 | + if ((aicode = getaddrinfo(NULL, "sunrpc", &hints, &res))!= 0) { | ||
27 | printf("cannot get local address for %s: %s", nconf->nc_netid, gai_strerror(aicode)); | ||
28 | syslog(LOG_ERR, | ||
29 | "cannot get local address for %s: %s", | ||