summaryrefslogtreecommitdiff
path: root/src/common/ip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/ip.c')
-rw-r--r--src/common/ip.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/common/ip.c b/src/common/ip.c
index 267103efb9..dd9193feb1 100644
--- a/src/common/ip.c
+++ b/src/common/ip.c
@@ -38,7 +38,6 @@
-#ifdef HAVE_UNIX_SOCKETS
static int getaddrinfo_unix(const char *path,
const struct addrinfo *hintsp,
struct addrinfo **result);
@@ -47,7 +46,6 @@ static int getnameinfo_unix(const struct sockaddr_un *sa, int salen,
char *node, int nodelen,
char *service, int servicelen,
int flags);
-#endif
/*
@@ -62,10 +60,8 @@ pg_getaddrinfo_all(const char *hostname, const char *servname,
/* not all versions of getaddrinfo() zero *result on failure */
*result = NULL;
-#ifdef HAVE_UNIX_SOCKETS
if (hintp->ai_family == AF_UNIX)
return getaddrinfo_unix(servname, hintp, result);
-#endif
/* NULL has special meaning to getaddrinfo(). */
rc = getaddrinfo((!hostname || hostname[0] == '\0') ? NULL : hostname,
@@ -87,7 +83,6 @@ pg_getaddrinfo_all(const char *hostname, const char *servname,
void
pg_freeaddrinfo_all(int hint_ai_family, struct addrinfo *ai)
{
-#ifdef HAVE_UNIX_SOCKETS
if (hint_ai_family == AF_UNIX)
{
/* struct was built by getaddrinfo_unix (see pg_getaddrinfo_all) */
@@ -101,7 +96,6 @@ pg_freeaddrinfo_all(int hint_ai_family, struct addrinfo *ai)
}
}
else
-#endif /* HAVE_UNIX_SOCKETS */
{
/* struct was built by getaddrinfo() */
if (ai != NULL)
@@ -126,14 +120,12 @@ pg_getnameinfo_all(const struct sockaddr_storage *addr, int salen,
{
int rc;
-#ifdef HAVE_UNIX_SOCKETS
if (addr && addr->ss_family == AF_UNIX)
rc = getnameinfo_unix((const struct sockaddr_un *) addr, salen,
node, nodelen,
service, servicelen,
flags);
else
-#endif
rc = getnameinfo((const struct sockaddr *) addr, salen,
node, nodelen,
service, servicelen,
@@ -151,8 +143,6 @@ pg_getnameinfo_all(const struct sockaddr_storage *addr, int salen,
}
-#if defined(HAVE_UNIX_SOCKETS)
-
/* -------
* getaddrinfo_unix - get unix socket info using IPv6-compatible API
*
@@ -286,4 +276,3 @@ getnameinfo_unix(const struct sockaddr_un *sa, int salen,
return 0;
}
-#endif /* HAVE_UNIX_SOCKETS */