Skip to content

Commit f6322b3

Browse files
committed
In pg_upgrade, only compile copy_file() on non-Win32 systems.
Per report from Andrew Dunstan.
1 parent 795c382 commit f6322b3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

contrib/pg_upgrade/file.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
#include <fcntl.h>
1313

1414

15-
static int copy_file(const char *fromfile, const char *tofile, bool force);
1615

17-
#ifdef WIN32
16+
#ifndef WIN32
17+
static int copy_file(const char *fromfile, const char *tofile, bool force);
18+
#else
1819
static int win32_pghardlink(const char *src, const char *dst);
1920
#endif
2021

@@ -126,6 +127,7 @@ linkAndUpdateFile(pageCnvCtx *pageConverter,
126127
}
127128

128129

130+
#ifndef WIN32
129131
static int
130132
copy_file(const char *srcfile, const char *dstfile, bool force)
131133
{
@@ -220,6 +222,7 @@ copy_file(const char *srcfile, const char *dstfile, bool force)
220222

221223
return 1;
222224
}
225+
#endif
223226

224227

225228
/*

0 commit comments

Comments
 (0)