Musl will always return something with getservbyport so we cannot skip ports that returns non-null. --- utils/statd/rmtcall.c +++ utils/statd/rmtcall.c @@ -90,8 +90,10 @@ statd_get_socket(void) __func__); break; } +#if defined(__GLIBC__) se = getservbyport(sin.sin_port, "udp"); if (se == NULL) +#endif break; /* rather not use that port, try again */