summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq
diff options
context:
space:
mode:
authorThomas Munro2022-08-13 21:53:28 +0000
committerThomas Munro2022-08-13 21:53:28 +0000
commit5579388d2dda60ded329a4623f9b4529e91a1b24 (patch)
tree01eacd42c65c6d419f5b2d6caf85e2cfefc5653b /src/interfaces/libpq
parentde42bc3ac8f7205f2c302b402e40704ceb46a70c (diff)
Remove replacement code for getaddrinfo.
SUSv3, all targeted Unixes and modern Windows have getaddrinfo() and related interfaces. Drop the replacement implementation, and adjust some headers slightly to make sure that the APIs are visible everywhere using standard POSIX headers and names. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CA%2BhUKG%2BL_3brvh%3D8e0BW_VfX9h7MtwgN%3DnFHP5o7X2oZucY9dg%40mail.gmail.com
Diffstat (limited to 'src/interfaces/libpq')
-rw-r--r--src/interfaces/libpq/fe-connect.c1
-rw-r--r--src/interfaces/libpq/libpq-int.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 730e79a31d2..0b8fabc7e81 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -18,6 +18,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <ctype.h>
+#include <netdb.h>
#include <time.h>
#include <unistd.h>
diff --git a/src/interfaces/libpq/libpq-int.h b/src/interfaces/libpq/libpq-int.h
index 51ab51f9f92..1eb752a82da 100644
--- a/src/interfaces/libpq/libpq-int.h
+++ b/src/interfaces/libpq/libpq-int.h
@@ -23,6 +23,8 @@
/* We assume libpq-fe.h has already been included. */
#include "libpq-events.h"
+#include <netdb.h>
+#include <sys/socket.h>
#include <time.h>
#ifndef WIN32
#include <sys/time.h>
@@ -38,7 +40,6 @@
#endif
/* include stuff common to fe and be */
-#include "getaddrinfo.h"
#include "libpq/pqcomm.h"
/* include stuff found in fe only */
#include "fe-auth-sasl.h"