aboutsummaryrefslogtreecommitdiffstats
path: root/common/simple-pwquery.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/simple-pwquery.c')
-rw-r--r--common/simple-pwquery.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/simple-pwquery.c b/common/simple-pwquery.c
index 23e4b893a..08f59d246 100644
--- a/common/simple-pwquery.c
+++ b/common/simple-pwquery.c
@@ -222,7 +222,7 @@ agent_send_all_options (int fd)
}
dft_ttyname = getenv ("GPG_TTY");
-#ifndef HAVE_W32_SYSTEM
+#if !defined(HAVE_W32_SYSTEM) && !defined(HAVE_BROKEN_TTYNAME)
if ((!dft_ttyname || !*dft_ttyname) && ttyname (0))
dft_ttyname = ttyname (0);
#endif