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 5676d501229..2927b60cc2d 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -1830,6 +1830,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
@@ -1892,7 +1897,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());
@@ -1900,7 +1905,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"),