diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c
new file mode 100644
index 179793e..b9155b4
*** a/src/interfaces/libpq/fe-auth.c
--- b/src/interfaces/libpq/fe-auth.c
*************** pg_fe_sendauth(AuthRequest areq, PGconn
*** 715,726 ****
   * pg_fe_getauthname
   *
   * Returns a pointer to dynamic space containing whatever name the user
!  * has authenticated to the system.  If there is an error, return NULL.
   */
  char *
  pg_fe_getauthname(void)
  {
! 	const char *name = NULL;
  	char	   *authn;
  
  #ifdef WIN32
--- 715,731 ----
   * pg_fe_getauthname
   *
   * Returns a pointer to dynamic space containing whatever name the user
!  * has authenticated to the system.  Returns NULL on memory allocation
!  * failure, and a zero-length string on user name lookup failure.
   */
  char *
  pg_fe_getauthname(void)
  {
! 	/*
! 	 * We might be in a chroot environment where we can't look up our own
! 	 * user name, so return "".
! 	 */
! 	const char *name = "";
  	char	   *authn;
  
  #ifdef WIN32
