Amúgy: mi az _X_OPEN_SOURCE értéke a definíciókor nálad? A freeadrinfo() a POSIX.1-2001-be került bele: https://pubs.opengroup.org/onlinepubs/009695399/basedefs/netdb.h.html#t…
Régebbi POSIX-nak nem lehetett a része, egy 1999-es RFC definiálta: https://www.rfc-editor.org/rfc/rfc2553.html#section-6.4
https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros…
Azaz _X_OPEN_SOURCE értéke ez alapján 600 vagy 700 legyen. Ha más az értéke, akkor a freeaddrinfo nem lesz elérhető:
f the macro _XOPEN_SOURCE has the value 500 this includes all functionality described so far plus some new definitions from the Single Unix Specification, version 2. The value 600 (corresponding to the sixth revision) includes definitions from SUSv3, and using 700 (the seventh revision) includes definitions from SUSv4.
Tehát nem elég csak definiálni az _X_OPEN_SOURCE makrót, konkrét értéket is adj neki. Különben nem fogod megkapni, csak a régi, 1997 előtti POSIX.1 és POSIX.2 definíciókat.
Szerintem nem olyan nehéz a fordítás, csak megfelelően kell használni a Feature test macrokat.