not sure this is the best fix but it should work
struct addrinfo *ai, hint = { .ai_family = AF_INET };
int i;
+ if (!prots) return -(
+ getservbyname_r(name, "tcp", se, buf, buflen, res)
+ && getservbyname_r(name, "udp", se, buf, buflen, res) );
+
/* Align buffer */
i = (uintptr_t)buf & sizeof(char *)-1;
if (!i) i = sizeof(char *);
.sin_port = port,
};
+ if (!prots) return -(
+ getservbyport_r(port, "tcp", se, buf, buflen, res)
+ && getservbyport_r(port, "udp", se, buf, buflen, res) );
+
/* Align buffer */
i = (uintptr_t)buf & sizeof(char *)-1;
if (!i) i = sizeof(char *);