Detect inet_pton() availability on MinGW automatically
This commit is contained in:
parent
5a07f531e5
commit
3b7b079642
1 changed files with 6 additions and 1 deletions
|
@ -22,6 +22,12 @@
|
|||
#define LUASOCKET_INET_ATON
|
||||
#endif
|
||||
|
||||
/* MSVC and MinGW provides "#define InetPtonA inet_pton" when
|
||||
* inet_pton() is available. */
|
||||
#if !defined(LUASOCKET_INET_PTON) && defined(_WIN32) && !defined(InetPtonA)
|
||||
#define LUASOCKET_INET_PTON
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
#pragma GCC visibility push(hidden)
|
||||
#endif
|
||||
|
@ -45,7 +51,6 @@ int inet_aton(const char *cp, struct in_addr *inp);
|
|||
#endif
|
||||
|
||||
#ifdef LUASOCKET_INET_PTON
|
||||
const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt);
|
||||
int inet_pton(int af, const char *src, void *dst);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue