From 5a58786a39bbef7ed4805821cc921f1d40f12068 Mon Sep 17 00:00:00 2001 From: Paul Kulchenko Date: Sun, 7 Apr 2013 12:39:56 -0700 Subject: Added inet_pton/inet_ntop for MinGW on Windows; compiles with Lua52. --- src/inet.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/inet.h') diff --git a/src/inet.h b/src/inet.h index 4678ba6..2f72533 100644 --- a/src/inet.h +++ b/src/inet.h @@ -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 */ -- cgit v1.2.3-55-g6feb