summaryrefslogtreecommitdiff
path: root/src/bin/pg_basebackup/pg_basebackup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_basebackup/pg_basebackup.c')
-rw-r--r--src/bin/pg_basebackup/pg_basebackup.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index 7e961743ebc..86e18f6e61b 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -1812,6 +1812,11 @@ BaseBackup(void)
int r;
#else
DWORD status;
+ /*
+ * get a pointer sized version of bgchild to avoid warnings about
+ * casting to a different size on WIN64.
+ */
+ intptr_t bgchild_handle = bgchild;
uint32 hi,
lo;
#endif
@@ -1874,7 +1879,7 @@ BaseBackup(void)
InterlockedIncrement(&has_xlogendptr);
/* First wait for the thread to exit */
- if (WaitForSingleObjectEx((HANDLE) bgchild, INFINITE, FALSE) !=
+ if (WaitForSingleObjectEx((HANDLE) bgchild_handle, INFINITE, FALSE) !=
WAIT_OBJECT_0)
{
_dosmaperr(GetLastError());
@@ -1882,7 +1887,7 @@ BaseBackup(void)
progname, strerror(errno));
disconnect_and_exit(1);
}
- if (GetExitCodeThread((HANDLE) bgchild, &status) == 0)
+ if (GetExitCodeThread((HANDLE) bgchild_handle, &status) == 0)
{
_dosmaperr(GetLastError());
fprintf(stderr, _("%s: could not get child thread exit status: %s\n"),