aboutsummaryrefslogtreecommitdiffstats
path: root/agent/gpg-agent.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2007-07-04 19:49:40 +0000
committerWerner Koch <[email protected]>2007-07-04 19:49:40 +0000
commit93d3811abc9e1a1199c0c2594d6b2163d2ce5324 (patch)
tree7c374293c539db3cf2057c830ef2da2ece2bb10c /agent/gpg-agent.c
parentA bunch of minor changes for Windows. (diff)
downloadgnupg-93d3811abc9e1a1199c0c2594d6b2163d2ce5324.tar.gz
gnupg-93d3811abc9e1a1199c0c2594d6b2163d2ce5324.zip
Changed to GPLv3.
Removed intl/.
Diffstat (limited to 'agent/gpg-agent.c')
-rw-r--r--agent/gpg-agent.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index a75acec94..626581779 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -6,7 +6,7 @@
*
* GnuPG is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* GnuPG is distributed in the hope that it will be useful,
@@ -15,9 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- * USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
@@ -232,6 +230,10 @@ static int check_for_running_agent (int silent, int mode);
/* Pth wrapper function definitions. */
GCRY_THREAD_OPTION_PTH_IMPL;
+static int fixed_gcry_pth_init (void)
+{
+ return pth_self ()? 0 : (pth_init () == FALSE) ? errno : 0;
+}
@@ -457,6 +459,7 @@ main (int argc, char **argv )
/* Libgcrypt requires us to register the threading model first.
Note that this will also do the pth_init. */
+ gcry_threads_pth.init = fixed_gcry_pth_init;
err = gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pth);
if (err)
{