mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
tests/server/util: remove in6addr_any for recent MinGW
In ancient MinGW versions, in6addr_any was declared as extern, but not defined. Because of that,22a0c57746
added definitions for in6addr_any when compiling with MinGW. The bug was fixed in w32api version 3.6 from 2006, so this workaround is not needed anymore for recent versions. This fixes the following MinGW-w64 warnings because the MinGW-w64 version of IN6ADDR_ANY_INIT has the two additional braces inside the macro: util.c:59:14: warning: braces around scalar initializer util.c:59:40: warning: excess elements in scalar initializer Ref:e4803e0da2/tree/w32api/ChangeLog
Closes https://github.com/curl/curl/pull/1379
This commit is contained in:
parent
721f8c05c7
commit
55f4ababde
@ -39,6 +39,9 @@
|
||||
#elif defined(HAVE_POLL_H)
|
||||
#include <poll.h>
|
||||
#endif
|
||||
#ifdef __MINGW32__
|
||||
#include <w32api.h>
|
||||
#endif
|
||||
|
||||
#define ENABLE_CURLX_PRINTF
|
||||
/* make the curlx header define all printf() functions to use the curlx_*
|
||||
@ -55,9 +58,14 @@
|
||||
#define EINVAL 22 /* errno.h value */
|
||||
#endif
|
||||
|
||||
/* MinGW with w32api version < 3.6 declared in6addr_any as extern,
|
||||
but lacked the definition */
|
||||
#if defined(ENABLE_IPV6) && defined(__MINGW32__)
|
||||
#if (__W32API_MAJOR_VERSION < 3) || \
|
||||
((__W32API_MAJOR_VERSION == 3) && (__W32API_MINOR_VERSION < 6))
|
||||
const struct in6_addr in6addr_any = {{ IN6ADDR_ANY_INIT }};
|
||||
#endif
|
||||
#endif /* w32api < 3.6 */
|
||||
#endif /* ENABLE_IPV6 && __MINGW32__*/
|
||||
|
||||
/* This function returns a pointer to STATIC memory. It converts the given
|
||||
* binary lump to a hex formatted string usable for output in logs or
|
||||
|
Loading…
Reference in New Issue
Block a user