Commit 0d0dcf76 authored by Philip Withnall's avatar Philip Withnall Committed by Olivier Crête

agent: Define IN6_ARE_ADDR_EQUAL macro when building under MinGW

Older versions of MinGW don’t define IN6_ARE_ADDR_EQUAL, as normally
defined in netinet/in.h. Conditionally define it in address.c to fix the
build on MinGW.

MinGW has added support for the macro here:
https://github.com/mirror/mingw-w64/commit/0f4899473c4ba2e34fa447b1931a04e38c1f105e

Based on a patch originally by Luciana Fujii Pontello
<luciana@fujii.eti.br>.
parent f7d32836
......@@ -50,6 +50,14 @@
#define inet_pton inet_pton_win32
#define inet_ntop inet_ntop_win32
/* Defined in recent versions of mingw:
* https://github.com/mirror/mingw-w64/commit/0f4899473c4ba2e34fa447b1931a04e38c1f105e
*/
#ifndef IN6_ARE_ADDR_EQUAL
#define IN6_ARE_ADDR_EQUAL(a, b) \
(memcmp ((const void *) (a), (const void *) (b), sizeof (struct in6_addr)) == 0)
#endif
static const char *
inet_ntop_win32 (int af, const void *src, char *dst, socklen_t cnt)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment