diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2024-09-30 11:32:32 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2024-09-30 11:32:32 -0400 |
commit | d700e8d75bc3844d866bf15c8cadbd72d759422d (patch) | |
tree | cf87a70330922a8a8446bc16c868b1fd5af724ea /src | |
parent | 92cc21d158f30d46642b5123697f71b7a740fbd7 (diff) | |
download | postgresql-d700e8d75bc3844d866bf15c8cadbd72d759422d.tar.gz postgresql-d700e8d75bc3844d866bf15c8cadbd72d759422d.zip |
Bump MIN_WINNT for MINGW to clear a build error
Because we have been setting this too low, there has been a
long-standing warning about a missing declaration for inet_pton().
Modern gcc now considers this an error, so we have been getting failures
on the buildfarm animal fairywren.
Fix suggested by Thomas Munro.
This isn't needed in later branches, as they already set MIN_WINNT
higher, nor on earlier branches because they don't use inet_pton().
Discussion: https://postgr.es/m/574fae43-c993-4a25-b0e5-04c3e9c36d6d@dunslane.net
Diffstat (limited to 'src')
-rw-r--r-- | src/include/port/win32.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/include/port/win32.h b/src/include/port/win32.h index c6213c77c3a..4b180bf30d2 100644 --- a/src/include/port/win32.h +++ b/src/include/port/win32.h @@ -13,10 +13,12 @@ * Make sure _WIN32_WINNT has the minimum required value. * Leave a higher value in place. When building with at least Visual * Studio 2015 the minimum requirement is Windows Vista (0x0600) to - * get support for GetLocaleInfoEx() with locales. For everything else + * get support for GetLocaleInfoEx() with locales. For other MSC versions * the minimum version is Windows XP (0x0501). + * For non-MSC compilers use 0x0600, which is required to get the inet_pton() + * declaration. */ -#if defined(_MSC_VER) && _MSC_VER >= 1900 +#if !defined(_MSC_VER) || _MSC_VER >= 1900 #define MIN_WINNT 0x0600 #else #define MIN_WINNT 0x0501 |