diff options
author | Paul Kulchenko <paul@kulchenko.com> | 2013-04-07 12:39:56 -0700 |
---|---|---|
committer | Paul Kulchenko <paul@kulchenko.com> | 2013-04-07 12:39:56 -0700 |
commit | 5a58786a39bbef7ed4805821cc921f1d40f12068 (patch) | |
tree | d5d412ec3a54e904e82b68945a153e60f656e4ed /src/inet.h | |
parent | d548a78e5516bcc85d44f1d419cf53c71d6dcd79 (diff) | |
download | luasocket-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.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 | ||
25 | int inet_open(lua_State *L); | 26 | int inet_open(lua_State *L); |
@@ -42,4 +43,9 @@ int inet_optsocktype(lua_State* L, int narg, const char* def); | |||
42 | int inet_aton(const char *cp, struct in_addr *inp); | 43 | int inet_aton(const char *cp, struct in_addr *inp); |
43 | #endif | 44 | #endif |
44 | 45 | ||
46 | #ifdef INET_PTON | ||
47 | const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt); | ||
48 | int inet_pton(int af, const char *src, void *dst); | ||
49 | #endif | ||
50 | |||
45 | #endif /* INET_H */ | 51 | #endif /* INET_H */ |