From 27910bcbea854f36ee993af79a63ad184933c98a Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter_e@gmx.net>
Date: Tue, 30 Aug 2016 12:00:00 -0400
Subject: [PATCH 24/27] Make inet_net_?to? C linkage

These functions can also be declared by the operating system, so we need
to match the linkage.
---
 src/include/port.h           | 2 +-
 src/include/utils/builtins.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/include/port.h b/src/include/port.h
index 455f723..2607a3d 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -450,7 +450,7 @@ extern int	pg_codepage_to_encoding(UINT cp);
 #endif
 
 /* port/inet_net_ntop.c */
-extern char *inet_net_ntop(int af, const void *src, int bits,
+extern "C" char *inet_net_ntop(int af, const void *src, int bits,
 			  char *dst, size_t size);
 
 /* port/pgcheckdir.c */
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index 2ae212a..3f71457 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -947,7 +947,7 @@ extern char *inet_cidr_ntop(int af, const void *src, int bits,
 			   char *dst, size_t size);
 
 /* inet_net_pton.c */
-extern int inet_net_pton(int af, const char *src,
+extern "C" int inet_net_pton(int af, const char *src,
 			  void *dst, size_t size);
 
 /* network.c */
-- 
2.9.3

