Workaround for systems that miss IPV6_V6ONLY

This should improve compatibility with old systems that miss
IPV6_V6ONLY and in particular for Windows XP
This commit is contained in:
Gioacchino Mazzurco 2018-04-15 12:32:39 +02:00
parent c19919962d
commit f20705b36d
No known key found for this signature in database
GPG Key ID: A1FBCA3872E87051

View File

@ -58,6 +58,15 @@ int inet_aton(const char *name, struct in_addr *addr);
#endif
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
/**
* Workaround for binary compatibility between Windows XP (which miss
* IPV6_V6ONLY define), and newer Windows that has it.
* @see http://lua-users.org/lists/lua-l/2013-04/msg00191.html
*/
#ifndef IPV6_V6ONLY
# define IPV6_V6ONLY 27
#endif
/* 64 bit conversions */
#ifndef ntohll
uint64_t ntohll(uint64_t x);