aboutsummaryrefslogtreecommitdiffstats
path: root/sm/misc.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2012-11-20 18:01:13 +0000
committerWerner Koch <[email protected]>2012-11-20 18:03:49 +0000
commit835698b72bc509565aad52b0753f1c56c1a8f062 (patch)
treedd5352b45d74cb3ef4b3091dcc16824ce57e4991 /sm/misc.c
parentFix non-portable use of chmod in autogen.sh. (diff)
downloadgnupg-835698b72bc509565aad52b0753f1c56c1a8f062.tar.gz
gnupg-835698b72bc509565aad52b0753f1c56c1a8f062.zip
Do not use a broken ttyname.
* configure.ac (HAVE_BROKEN_TTYNAME): New ac_define set for Android systems. * common/util.h (gnupg_ttyname): New macro. Change all callers of ttyname to use this macro instead. (ttyname) [W32]: Rename to _gnupg_ttyname and use also if HAVE_BROKEN_TTYNAME is defined. * common/simple-pwquery.c (agent_send_all_options): Keep on using ttyname unless HAVE_BROKEN_TTYNAME is set. This is because this file may be used standalone.
Diffstat (limited to 'sm/misc.c')
-rw-r--r--sm/misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sm/misc.c b/sm/misc.c
index 4c6293fc2..ec9f97e02 100644
--- a/sm/misc.c
+++ b/sm/misc.c
@@ -57,7 +57,7 @@ setup_pinentry_env (void)
{
log_error (_("GPG_TTY has not been set - "
"using maybe bogus default\n"));
- lc = ttyname (0);
+ lc = gnupg_ttyname (0);
if (!lc)
lc = "/dev/tty";
gnupg_setenv ("GPG_TTY", lc, 1);