Menu

#2147 function prototype for inet_ntop/inet_pton are missing

OTHER
unread
nobody
None
Support
none
Unknown
False
2017-08-29
2013-12-11
No

define __MINGW32_VERSION 3.20

define __MINGW32_MAJOR_VERSION 3

define __MINGW32_MINOR_VERSION 20

define __MINGW32_PATCHLEVEL 0

Function prototypes for inet_ntop/inet_pton are not included in the headers. The functions are included in libws2_32.a, and work.

This prototype worked for me:

WINSOCK_API_LINKAGE const char inet_ntop(int af, const void src, char *dst, socklen_t size);

Discussion

  • Glenn Burkhardt

    Glenn Burkhardt - 2013-12-11

    Correction: prototype should be:

    WINSOCK_API_LINKAGE const char WSAAPI inet_ntop(int af, const void src,
    char *dst, socklen_t size);

     
  • Martin Melik-Merkumians

    I would also like to use inet_ntop and inet_pton, but cannot get it to work with your prototype.