Fix Clang link errors and address of ws2 inline functions

The following example works with MSVC but will fail using the mingw headers:

    #include <ws2tcpip.h>
    int main(int argc, char **argv) {
        return (int)&IN6_IS_ADDR_UNSPECIFIED;
    }

The reason for this is because MinGW is defining this `IN6_IS_ADDR_UNSPECIFIED` function with
`extern inline __attribute__((__gnu_inline__))`. A function defined with these attributes will
NEVER be emitted.  This means you cannot take the address of the function
and if the compiler does not inline a call to it, then you'll get a linker error.

In the Windows SDK in ws2ipdef.h, this function uses the `__inline` attribute

https://docs.microsoft.com/en-us/cpp/cpp/inline-functions-cpp?view=msvc-160

> This keyword tells the compiler that inline expansion is preferred. However, the compiler
> can create a separate instance of the function (instantiate) and create standard calling
> linkages instead of inserting the code inline.  Two cases where this behavior can happen are:
>     * Recursive Functions
>     * Functions that are referred to through a pointer elsewhere in the translation unit.

Note that this function is not defined in any .lib or .dll file in the Windows sdk and/or runtime,
so the only way to be able to take the address of it from the example above is if the compiler
is able to emit the function, or if it's defined elsewhere.

The problem here appears to be the inclusion of `__attribute__((__gnu_inline__))` which is what
tells the compiler NEVER to emit the function definition.  Removing this attribute allows the compiler
to emit the function which allows its address to be taken, and prevents linker errors if the compiler
decides not to inline a call to it.  These linker errors occur often on Clang even when then functions
are only being called (not even taking the addresses of them) which appears to be caused
by a decision from Clang to not inline calls to these functions in some cases.

Note that this applies to multiple functions in the ws2 header files.

To fix this, I've modified these ws2 functions to use __mingw_ovr instead of __CRT_INLINE along
with adding the "static" modifier to the accompanying function declarations.  This should
cause each translation unit to have their own instance of these functions without
causing multiple definition errors.  This is not the exact behavior of MSVC's `__inline`
attribute, but it a solution that uses mingw's existing inline mechanisms without coming up
with new ones or modifying existing ones could result in exposing the library to odd corner cases
from obscure platforms/toolchains/stdc implementations.

Signed-off-by: LIU Hao <lh_mouse@126.com>
diff --git a/mingw-w64-headers/include/ws2ipdef.h b/mingw-w64-headers/include/ws2ipdef.h
index d440bbc..6b10db3 100644
--- a/mingw-w64-headers/include/ws2ipdef.h
+++ b/mingw-w64-headers/include/ws2ipdef.h
@@ -238,9 +238,9 @@
   SOCKADDR_STORAGE gsr_source;
 } GROUP_SOURCE_REQ, *PGROUP_SOURCE_REQ;
 
-#define WS2TCPIP_INLINE __CRT_INLINE
+#define WS2TCPIP_INLINE __mingw_ovr
 
-int IN6_ADDR_EQUAL(const struct in6_addr *,const struct in6_addr *);
+static int IN6_ADDR_EQUAL(const struct in6_addr *,const struct in6_addr *);
 WS2TCPIP_INLINE int IN6_ADDR_EQUAL(const struct in6_addr *a, const struct in6_addr *b) {
     return !memcmp(a, b, sizeof(struct in6_addr));
 }
diff --git a/mingw-w64-headers/include/ws2tcpip.h b/mingw-w64-headers/include/ws2tcpip.h
index 0a7890b..cf7d28b 100644
--- a/mingw-w64-headers/include/ws2tcpip.h
+++ b/mingw-w64-headers/include/ws2tcpip.h
@@ -46,24 +46,24 @@
   extern const struct in6_addr in6addr_any;
   extern const struct in6_addr in6addr_loopback;
 
-int IN6_IS_ADDR_UNSPECIFIED(const struct in6_addr *);
-int IN6_IS_ADDR_LOOPBACK(const struct in6_addr *);
-int IN6_IS_ADDR_MULTICAST(const struct in6_addr *);
-int IN6_IS_ADDR_LINKLOCAL(const struct in6_addr *);
-int IN6_IS_ADDR_SITELOCAL(const struct in6_addr *);
-int IN6_IS_ADDR_V4MAPPED(const struct in6_addr *);
-int IN6_IS_ADDR_V4COMPAT(const struct in6_addr *);
-int IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
-int IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
-int IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
-int IN6_IS_ADDR_MC_ORGLOCAL(const struct in6_addr *);
-int IN6_IS_ADDR_MC_GLOBAL(const struct in6_addr *);
-int IN6ADDR_ISANY(const struct sockaddr_in6 *);
-int IN6ADDR_ISLOOPBACK(const struct sockaddr_in6 *);
-void IN6_SET_ADDR_UNSPECIFIED(struct in6_addr *);
-void IN6_SET_ADDR_LOOPBACK(struct in6_addr *);
-void IN6ADDR_SETANY(struct sockaddr_in6 *);
-void IN6ADDR_SETLOOPBACK(struct sockaddr_in6 *);
+static int IN6_IS_ADDR_UNSPECIFIED(const struct in6_addr *);
+static int IN6_IS_ADDR_LOOPBACK(const struct in6_addr *);
+static int IN6_IS_ADDR_MULTICAST(const struct in6_addr *);
+static int IN6_IS_ADDR_LINKLOCAL(const struct in6_addr *);
+static int IN6_IS_ADDR_SITELOCAL(const struct in6_addr *);
+static int IN6_IS_ADDR_V4MAPPED(const struct in6_addr *);
+static int IN6_IS_ADDR_V4COMPAT(const struct in6_addr *);
+static int IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
+static int IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
+static int IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
+static int IN6_IS_ADDR_MC_ORGLOCAL(const struct in6_addr *);
+static int IN6_IS_ADDR_MC_GLOBAL(const struct in6_addr *);
+static int IN6ADDR_ISANY(const struct sockaddr_in6 *);
+static int IN6ADDR_ISLOOPBACK(const struct sockaddr_in6 *);
+static void IN6_SET_ADDR_UNSPECIFIED(struct in6_addr *);
+static void IN6_SET_ADDR_LOOPBACK(struct in6_addr *);
+static void IN6ADDR_SETANY(struct sockaddr_in6 *);
+static void IN6ADDR_SETLOOPBACK(struct sockaddr_in6 *);
 
 WS2TCPIP_INLINE int IN6_IS_ADDR_UNSPECIFIED(const struct in6_addr *a) { return ((a->s6_words[0]==0) && (a->s6_words[1]==0) && (a->s6_words[2]==0) && (a->s6_words[3]==0) && (a->s6_words[4]==0) && (a->s6_words[5]==0) && (a->s6_words[6]==0) && (a->s6_words[7]==0)); }
 WS2TCPIP_INLINE int IN6_IS_ADDR_LOOPBACK(const struct in6_addr *a) { return ((a->s6_words[0]==0) && (a->s6_words[1]==0) && (a->s6_words[2]==0) && (a->s6_words[3]==0) && (a->s6_words[4]==0) && (a->s6_words[5]==0) && (a->s6_words[6]==0) && (a->s6_words[7]==0x0100)); }