From b69fe61410413e7c1b504704e782e857b8af9e3a 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 v2 17/23] Add C linkage to replacement declaration of
 fdatasync

---
 src/include/c.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/include/c.h b/src/include/c.h
index 7f303a4f39..4adb249e75 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -1103,7 +1103,7 @@ extern int	vsnprintf(char *str, size_t count, const char *fmt, va_list args);
 #endif
 
 #if defined(HAVE_FDATASYNC) && !HAVE_DECL_FDATASYNC
-extern int	fdatasync(int fildes);
+extern "C" int	fdatasync(int fildes);
 #endif
 
 /* If strtoq() exists, rename it to the more standard strtoll() */
-- 
2.12.0

