Define the value for in6addr_any on MingW, since it provides the struct
authorMagnus Hagander <magnus@hagander.net>
Tue, 9 Feb 2010 19:55:14 +0000 (19:55 +0000)
committerMagnus Hagander <magnus@hagander.net>
Tue, 9 Feb 2010 19:55:14 +0000 (19:55 +0000)
only in the header files and not in any libraries, yet declare it as
an extern.

src/backend/port/win32/mingwcompat.c

index 7e45fd0076d57bba4db9f99dfd54cc35d53562ea..1a19e2ff2644522e8868c455fa5471afc80a61ed 100644 (file)
 
 #include "postgres.h"
 
+#ifndef WIN32_ONLY_COMPILER
+/*
+ * MingW defines an extern to this struct, but the actual struct isn't present
+ * in any library. It's trivial enough that we can safely defined it
+ * ourselves.
+ */
+const struct in6_addr in6addr_any = {{{0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0}}};
+
+
 /*
  * This file contains loaders for functions that are missing in the MinGW
  * import libraries. It's only for actual Win32 API functions, so they are
  * all present in proper Win32 compilers.
  */
-#ifndef WIN32_ONLY_COMPILER
-
 static HMODULE kernel32 = NULL;
 
 /*