0006-mstcpip.h-is-not-missing-on-MinGW.patch

text/x-patch

Filename: 0006-mstcpip.h-is-not-missing-on-MinGW.patch
Type: text/x-patch
Part: 5
Message: Re: Cleaning up historical portability baggage

Patch

Format: format-patch
Series: patch 0006
Subject: mstcpip.h is not missing on MinGW.
File+
src/backend/libpq/pqcomm.c 1 1
src/interfaces/libpq/fe-connect.c 0 2
From 69615f6072a4cdad07dd31fe077b46d70391ce4f Mon Sep 17 00:00:00 2001
From: Thomas Munro <thomas.munro@gmail.com>
Date: Mon, 15 Aug 2022 16:37:06 +1200
Subject: [PATCH 6/6] mstcpip.h is not missing on MinGW.

Remove a small difference between MinGW and MSVC builds which is no
longer necessary.
---
 src/backend/libpq/pqcomm.c        | 2 +-
 src/interfaces/libpq/fe-connect.c | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c
index 3352ddb23b..d2f18dfe50 100644
--- a/src/backend/libpq/pqcomm.c
+++ b/src/backend/libpq/pqcomm.c
@@ -69,7 +69,7 @@
 #include <netinet/in.h>
 #include <netinet/tcp.h>
 #include <utime.h>
-#ifdef _MSC_VER					/* mstcpip.h is missing on mingw */
+#ifdef WIN32
 #include <mstcpip.h>
 #endif
 
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 36aabeef65..917b19e0e9 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -44,9 +44,7 @@
 #endif
 #define near
 #include <shlobj.h>
-#ifdef _MSC_VER					/* mstcpip.h is missing on mingw */
 #include <mstcpip.h>
-#endif
 #else
 #include <sys/socket.h>
 #include <netdb.h>
-- 
2.35.1