--- Socket.xs_orig 2022-04-30 00:30:13 +1000 +++ Socket.xs 2022-06-26 17:24:28 +1000 @@ -98,6 +98,14 @@ #endif +/* + * The Windows implementations of inet_ntop and inet_pton are available + * whenever (and only when) InetNtopA is defined. + * Use those implementations whenever they are available. + * Else use the implementations provided below. +*/ +#ifndef InetNtopA + static int inet_pton(int af, const char *src, void *dst) { struct sockaddr_storage ss; @@ -146,6 +154,8 @@ return dst; } +#endif /* InetNtopA not defined */ + #define HAS_INETPTON #define HAS_INETNTOP #endifThread Previous | Thread Next