aboutsummaryrefslogtreecommitdiff
path: root/src/inet.h
diff options
context:
space:
mode:
authorPaul Kulchenko <paul@kulchenko.com>2013-04-07 12:39:56 -0700
committerPaul Kulchenko <paul@kulchenko.com>2013-04-07 12:39:56 -0700
commit5a58786a39bbef7ed4805821cc921f1d40f12068 (patch)
treed5d412ec3a54e904e82b68945a153e60f656e4ed /src/inet.h
parentd548a78e5516bcc85d44f1d419cf53c71d6dcd79 (diff)
downloadluasocket-5a58786a39bbef7ed4805821cc921f1d40f12068.tar.gz
luasocket-5a58786a39bbef7ed4805821cc921f1d40f12068.tar.bz2
luasocket-5a58786a39bbef7ed4805821cc921f1d40f12068.zip
Added inet_pton/inet_ntop for MinGW on Windows; compiles with Lua52.
Diffstat (limited to '')
-rw-r--r--src/inet.h6
1 files changed, 6 insertions, 0 deletions
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 @@
20 20
21#ifdef _WIN32 21#ifdef _WIN32
22#define INET_ATON 22#define INET_ATON
23#define INET_PTON
23#endif 24#endif
24 25
25int inet_open(lua_State *L); 26int inet_open(lua_State *L);
@@ -42,4 +43,9 @@ int inet_optsocktype(lua_State* L, int narg, const char* def);
42int inet_aton(const char *cp, struct in_addr *inp); 43int inet_aton(const char *cp, struct in_addr *inp);
43#endif 44#endif
44 45
46#ifdef INET_PTON
47const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt);
48int inet_pton(int af, const char *src, void *dst);
49#endif
50
45#endif /* INET_H */ 51#endif /* INET_H */