TermuxT
Termux4mo ago
8 replies
VISΛGE

pip can't build pycares. How can I substitute `getservbyport_r()`?

I don't have much to add except that NetBSD also lacks this function. Here's the error excerpt
deps/c-ares/src/lib/ares_getnameinfo.c:300:15: error: call to undeclared function 'getservbyport_r'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        300 |           if (getservbyport_r(port, proto, &se, (void *)tmpbuf,
            |               ^
Solution
for me it works, and this is reportedly a very old error that only affects old versions of pycares.
Was this page helpful?