aa30e0f0bd
2) Revised configure to perform header check for rfuncs.h 3) Revised files referencing getenv_r, strerror_r and ttyname_r to include <rfuncs.h> if HAVE_RFUNCS_H
24 lines
681 B
Text
24 lines
681 B
Text
$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;
|