$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 #include #include +#if HAVE_RFUNCS_H +#include +#endif #include #include /* FIXME */ #include @@ -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;