diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index 15f43f9432b..77a7c148bae 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -1445,7 +1445,9 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum) if (file == NULL) { +#ifndef WIN32 int filemode; +#endif /* * No current file, so this must be the header for a new file @@ -1459,8 +1461,10 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum) current_len_left = read_tar_number(©buf[124], 12); +#ifndef WIN32 /* Set permissions on the file */ filemode = read_tar_number(©buf[100], 8); +#endif /* * All files are padded up to 512 bytes