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

Lines changed: 10 additions & 3 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy