Fixes https://dev.openwrt.org/ticket/20038 Patch is based on http://git.alpinelinux.org/cgit/aports/plain/main/nfs-utils/musl-getservbyport.patch?id=3579df3582b5e5ea53be8cd8eef240f3f0cabb10 Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
18 lines
497 B
Diff
18 lines
497 B
Diff
Musl will always return something with getservbyport so we cannot skip
|
|
ports that returns non-null.
|
|
|
|
diff --git a/utils/statd/rmtcall.c b/utils/statd/rmtcall.c
|
|
index fd576d9..d72a0bf 100644
|
|
--- a/utils/statd/rmtcall.c
|
|
+++ b/utils/statd/rmtcall.c
|
|
@@ -90,8 +90,10 @@ statd_get_socket(void)
|
|
__func__);
|
|
break;
|
|
}
|
|
+#if defined(__GLIBC__) || defined(__UCLIBC__)
|
|
se = getservbyport(sin.sin_port, "udp");
|
|
if (se == NULL)
|
|
+#endif
|
|
break;
|
|
/* rather not use that port, try again */
|
|
|