Added inet_pton/inet_ntop for MinGW on Windows; compiles with Lua52.

This commit is contained in:
Paul Kulchenko
2013-04-07 12:39:56 -07:00
parent d548a78e55
commit 5a58786a39
3 changed files with 65 additions and 0 deletions

View File

@ -20,6 +20,7 @@
#ifdef _WIN32
#define INET_ATON
#define INET_PTON
#endif
int inet_open(lua_State *L);
@ -42,4 +43,9 @@ int inet_optsocktype(lua_State* L, int narg, const char* def);
int inet_aton(const char *cp, struct in_addr *inp);
#endif
#ifdef 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
#endif /* INET_H */