From 530db2d66ad1dfe8b82c24e29556f2400954a6b7 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 30 Aug 2016 12:00:00 -0400 Subject: [PATCH v2 18/23] 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 f4546016e7..30da8e7d90 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -452,7 +452,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/pg_strong_random.c */ diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index 5bdca8203d..099b37d226 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -98,7 +98,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.12.0