From f20705b36d074f5c8f8ffc457645ab9cb948e807 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Sun, 15 Apr 2018 12:32:39 +0200 Subject: [PATCH] Workaround for systems that miss IPV6_V6ONLY This should improve compatibility with old systems that miss IPV6_V6ONLY and in particular for Windows XP --- libretroshare/src/util/rsnet.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libretroshare/src/util/rsnet.h b/libretroshare/src/util/rsnet.h index 1d028e991..a5381702c 100644 --- a/libretroshare/src/util/rsnet.h +++ b/libretroshare/src/util/rsnet.h @@ -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);