*** i/src/bin/pg_basebackup/pg_basebackup.c
--- w/src/bin/pg_basebackup/pg_basebackup.c
***************
*** 82,88 **** static bool segment_callback(XLogRecPtr segendpos, uint32 timeline);
  
  #ifdef HAVE_LIBZ
  static const char *
! get_gz_error(gzFile *gzf)
  {
  	int			errnum;
  	const char *errmsg;
--- 82,88 ----
  
  #ifdef HAVE_LIBZ
  static const char *
! get_gz_error(gzFile gzf)
  {
  	int			errnum;
  	const char *errmsg;
***************
*** 450,456 **** ReceiveTarFile(PGconn *conn, PGresult *res, int rownum)
  	FILE	   *tarfile = NULL;
  
  #ifdef HAVE_LIBZ
! 	gzFile	   *ztarfile = NULL;
  #endif
  
  	if (PQgetisnull(res, rownum, 0))
--- 450,456 ----
  	FILE	   *tarfile = NULL;
  
  #ifdef HAVE_LIBZ
! 	gzFile		ztarfile = NULL;
  #endif
  
  	if (PQgetisnull(res, rownum, 0))
*** i/src/bin/pg_dump/pg_backup_archiver.h
--- w/src/bin/pg_dump/pg_backup_archiver.h
***************
*** 247,253 **** typedef struct _archiveHandle
  	int			blobCount;		/* # of blobs restored */
  
  	char	   *fSpec;			/* Archive File Spec */
! 	FILE	   *FH;				/* General purpose file handle */
  	void	   *OF;
  	int			gzOut;			/* Output file */
  
--- 247,253 ----
  	int			blobCount;		/* # of blobs restored */
  
  	char	   *fSpec;			/* Archive File Spec */
! 	void	   *FH;				/* General purpose file handle */
  	void	   *OF;
  	int			gzOut;			/* Output file */
  
*** i/src/bin/pg_dump/pg_backup_files.c
--- w/src/bin/pg_dump/pg_backup_files.c
***************
*** 60,66 **** typedef struct
  typedef struct
  {
  #ifdef HAVE_LIBZ
! 	gzFile	   *FH;
  #else
  	FILE	   *FH;
  #endif
--- 60,66 ----
  typedef struct
  {
  #ifdef HAVE_LIBZ
! 	gzFile		FH;
  #else
  	FILE	   *FH;
  #endif
*** i/src/bin/pg_dump/pg_backup_tar.c
--- w/src/bin/pg_dump/pg_backup_tar.c
***************
*** 58,73 **** static void _EndBlobs(ArchiveHandle *AH, TocEntry *te);
  #define K_STD_BUF_SIZE 1024
  
  
  #ifdef HAVE_LIBZ
!  /* typedef gzFile	 ThingFile; */
! typedef FILE ThingFile;
  #else
! typedef FILE ThingFile;
  #endif
- 
- typedef struct
- {
- 	ThingFile  *zFH;
  	FILE	   *nFH;
  	FILE	   *tarFH;
  	FILE	   *tmpFH;
--- 58,70 ----
  #define K_STD_BUF_SIZE 1024
  
  
+ typedef struct
+ {
  #ifdef HAVE_LIBZ
! 	gzFile		zFH;
  #else
! 	FILE	   *zFH;
  #endif
  	FILE	   *nFH;
  	FILE	   *tarFH;
  	FILE	   *tmpFH;
