aboutsummaryrefslogtreecommitdiffstats
path: root/main/rpcbind/musl-sunrpc.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-04-28 15:48:19 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2014-04-28 15:50:10 +0200
commiteadc260707b766492fbff002b3d4776e68487177 (patch)
treec4484b04287d11860b566a806573315c6ba43f13 /main/rpcbind/musl-sunrpc.patch
parent8603f58746e0bb6b1deeef36bea5ea3d6fe5afe4 (diff)
downloadaports-eadc260707b766492fbff002b3d4776e68487177.tar.bz2
aports-eadc260707b766492fbff002b3d4776e68487177.tar.xz
main/rpcbind: workaround broken getaddrinfo/getservbyname in musl
rpcbind tries to get port number for "portmapper" but since musl's getaddrinfo/getservbyname does not support aliases, it fails for us. We work around it by using the service "sunrpc" instead.
Diffstat (limited to 'main/rpcbind/musl-sunrpc.patch')
-rw-r--r--main/rpcbind/musl-sunrpc.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/main/rpcbind/musl-sunrpc.patch b/main/rpcbind/musl-sunrpc.patch
new file mode 100644
index 0000000000..d8a2e27e24
--- /dev/null
+++ b/main/rpcbind/musl-sunrpc.patch
@@ -0,0 +1,25 @@
+The musl implementation of getaddrinfo and getservbyname does not
+aliases. As a workaround we use "sunprc" instead of "portmapper"
+
+diff --git a/src/rpcbind.c b/src/rpcbind.c
+index 83dbe93..9404df7 100644
+--- a/src/rpcbind.c
++++ b/src/rpcbind.c
+@@ -416,7 +416,7 @@ init_transport(struct netconfig *nconf)
+ if ((aicode = getaddrinfo(hosts[nhostsbak],
+ servname, &hints, &res)) != 0) {
+ if ((aicode = getaddrinfo(hosts[nhostsbak],
+- "portmapper", &hints, &res)) != 0) {
++ "sunrpc", &hints, &res)) != 0) {
+ syslog(LOG_ERR,
+ "cannot get local address for %s: %s",
+ nconf->nc_netid, gai_strerror(aicode));
+@@ -489,7 +489,7 @@ init_transport(struct netconfig *nconf)
+ if ((strcmp(nconf->nc_netid, "local") != 0) &&
+ (strcmp(nconf->nc_netid, "unix") != 0)) {
+ if ((aicode = getaddrinfo(NULL, servname, &hints, &res))!= 0) {
+- if ((aicode = getaddrinfo(NULL, "portmapper", &hints, &res))!= 0) {
++ if ((aicode = getaddrinfo(NULL, "sunrpc", &hints, &res))!= 0) {
+ printf("cannot get local address for %s: %s", nconf->nc_netid, gai_strerror(aicode));
+ syslog(LOG_ERR,
+ "cannot get local address for %s: %s",