specify WSAAPI as return type too, needed for MSYS2-32bit

This commit is contained in:
Riccardo Mottola 2020-06-15 23:52:35 +02:00
parent b879e0835b
commit 919f8c16d0
4 changed files with 7 additions and 9 deletions

View file

@ -61,10 +61,10 @@
#endif // HAVE_WS2TCPIP_H
#if !defined(HAVE_INET_NTOP)
extern const char *inet_ntop(int, const void *, char *, size_t);
extern const char* WSAAPI inet_ntop(int, const void *, char *, size_t);
#endif
#if !defined(HAVE_INET_NTOP)
extern int inet_pton(int , const char *, void *);
extern int WSAAPI inet_pton(int , const char *, void *);
#endif
#define OPTLEN int

View file

@ -43,10 +43,10 @@
#include <ws2tcpip.h>
#endif // HAVE_WS2TCPIP_H
#if !defined(HAVE_INET_NTOP)
extern const char *inet_ntop(int, const void *, char *, size_t);
extern const char* WSAAPI inet_ntop(int, const void *, char *, size_t);
#endif
#if !defined(HAVE_INET_NTOP)
extern int inet_pton(int , const char *, void *);
extern int WSAAPI inet_pton(int , const char *, void *);
#endif
#else /* !_WIN32 */
#include <netdb.h>

View file

@ -56,11 +56,8 @@ static __attribute__((unused)) const char *inet_ntop6(const u_char *src, char *
* Paul Vixie, 1996.
*/
const char *
inet_ntop(af, src, dst, size)
int af;
const void *src;
char *dst;
size_t size;
WSAAPI
inet_ntop(int af, const void *src, char *dst, size_t size)
{
switch (af) {
case AF_INET:

View file

@ -63,6 +63,7 @@ static int inet_pton6(const char *src, uint8_t *dst);
* Paul Vixie, 1996.
*/
int
WSAAPI
inet_pton(int af, const char *src, void *dst)
{