summaryrefslogtreecommitdiff
path: root/security/gpgme/patches/patch-ae
blob: 89157c5aef0c8cdefc94a85653442bd6f5b482d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$NetBSD: patch-ae,v 1.2 2004/11/04 20:41:21 shannonjr Exp $

--- gpgme/engine-gpgsm.c.orig	2004-10-22 12:29:21.000000000 -0600
+++ gpgme/engine-gpgsm.c
@@ -27,6 +27,9 @@
 #include <sys/types.h>
 #include <assert.h>
 #include <unistd.h>
+#if HAVE_RFUNCS_H
+#include <rfuncs.h>
+#endif
 #include <locale.h>
 #include <fcntl.h> /* FIXME */
 #include <errno.h>
@@ -452,7 +455,8 @@ gpgsm_new (void **engine, const char *lc
 
   if (isatty (1))
     {
-      if (ttyname_r (1, dft_ttyname, sizeof (dft_ttyname)))
+      /* ttyname_r() return numeric status */
+      if (err = ttyname_r (1, dft_ttyname, sizeof (dft_ttyname)))
 	{
 	  err = gpg_error_from_errno (errno);
 	  goto leave;