Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a8d3a39

Browse files
committed
Define the value for in6addr_any on MingW, since it provides the struct
only in the header files and not in any libraries, yet declare it as an extern.
1 parent 8740fe7 commit a8d3a39

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/backend/port/win32/mingwcompat.c

+10-3
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,27 @@
66
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
9-
* $PostgreSQL: pgsql/src/backend/port/win32/mingwcompat.c,v 1.8 2010/01/02 16:57:50 momjian Exp $
9+
* $PostgreSQL: pgsql/src/backend/port/win32/mingwcompat.c,v 1.9 2010/02/09 19:55:14 mha Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
1313

1414
#include "postgres.h"
1515

16+
#ifndef WIN32_ONLY_COMPILER
17+
/*
18+
* MingW defines an extern to this struct, but the actual struct isn't present
19+
* in any library. It's trivial enough that we can safely defined it
20+
* ourselves.
21+
*/
22+
const struct in6_addr in6addr_any = {{{0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0}}};
23+
24+
1625
/*
1726
* This file contains loaders for functions that are missing in the MinGW
1827
* import libraries. It's only for actual Win32 API functions, so they are
1928
* all present in proper Win32 compilers.
2029
*/
21-
#ifndef WIN32_ONLY_COMPILER
22-
2330
static HMODULE kernel32 = NULL;
2431

2532
/*

0 commit comments

Comments
 (0)