diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index 99dac84..4c08e51 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -2509,7 +2509,7 @@ walkdir(char *path, void (*action) (char *fname, bool isdir)) #ifndef WIN32 else if (S_ISLNK(fst.st_mode)) #else - else if (pg_win32_is_junction(subpath)) + else if (pgwin32_is_junction(subpath)) #endif { #if defined(HAVE_READLINK) || defined(WIN32) diff --git a/src/include/port.h b/src/include/port.h index 3787cbf..2082a64 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -285,7 +285,13 @@ extern int pgwin32_open(const char *, int,...); extern FILE *pgwin32_fopen(const char *, const char *); #ifndef FRONTEND -#define open(a,b,c) pgwin32_open(a,b,c) + +#ifdef HAVE__VA_ARGS +#define open(a,b,...) pgwin32_open(a,b,__VA_ARGS__) +#else +#define open pgwin32_open +#endif /* HAVE__VA_ARGS */ + #define fopen(a,b) pgwin32_fopen(a,b) #endif