in Microsoft SDKs\Windows\v6.0A\Include\ws2tcpip.h, inet_pton was defined when NTDDI_VERSION >= NTDDI_LONGHORN with the following lines: #if (NTDDI_VERSION >= NTDDI_LONGHORN) WINSOCK_API_LINKAGE INT WSAAPI inet_pton( __in INT Family, __in PCSTR pszAddrString, __out_bcount(sizeof(IN6_ADDR)) PVOID pAddrBuf ); ... ... so in socketmodule.c, inet_pton should not be defined in such a situation.