Implicit declaration of function 'getaddrinfo' on MinGW
问题 I have a C program that uses getaddrinfo() . It works as expected on Linux and Mac OS X. I'm in the middle of porting it to Windows. When I compile it (with MinGW gcc) I get the following warnings: ext/socket/socket.c: In function 'sl_tcp_socket_init': ext/socket/socket.c:98:5: warning implicit declaration of function 'getaddrinfo' [-Wimplicit-function-declaration] ext/socket/socket.c:104:9: warning implicit declaration of function 'freeaddrinfo' [-Wimplicit-function-declaration] Then the