>From 302aa05b8f4501cccde2ee909349b04b4469e093 Mon Sep 17 00:00:00 2001
From: Andres Freund <andres@anarazel.de>
Date: Tue, 11 Jun 2013 23:25:27 +0200
Subject: [PATCH 11/17] wal_decoding: copydir: make fsync_fname public

This probably should be somewhere else, its a generally useful function, not
really related to copying directories. fd.[ch]?
---
 src/backend/storage/file/copydir.c | 5 +----
 src/include/storage/copydir.h      | 1 +
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/backend/storage/file/copydir.c b/src/backend/storage/file/copydir.c
index 391359c..93ca13f 100644
--- a/src/backend/storage/file/copydir.c
+++ b/src/backend/storage/file/copydir.c
@@ -27,9 +27,6 @@
 #include "miscadmin.h"
 
 
-static void fsync_fname(char *fname, bool isdir);
-
-
 /*
  * copydir: copy a directory
  *
@@ -215,7 +212,7 @@ copy_file(char *fromfile, char *tofile)
  * Try to fsync directories but ignore errors that indicate the OS
  * just doesn't allow/require fsyncing directories.
  */
-static void
+void
 fsync_fname(char *fname, bool isdir)
 {
 	int			fd;
diff --git a/src/include/storage/copydir.h b/src/include/storage/copydir.h
index a087cce..3bccf3b 100644
--- a/src/include/storage/copydir.h
+++ b/src/include/storage/copydir.h
@@ -15,5 +15,6 @@
 
 extern void copydir(char *fromdir, char *todir, bool recurse);
 extern void copy_file(char *fromfile, char *tofile);
+extern void fsync_fname(char *fname, bool isdir);
 
 #endif   /* COPYDIR_H */
-- 
1.8.2.rc2.4.g7799588.dirty

