Fix do_rootfs error in crosswalk recipe
[scm/bb/meta-tizen.git] / meta-tizen-common-base / recipes-security / gpg2 / gpg2 / 0002-Do-not-set-gcrypt-thread-callback.patch
1 From 398602cad11b96025552e981f210f93c6ce03218 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?K=C3=A9vin=20THIERRY?= <kevin.thierry@open.eurogiciel.org>
3 Date: Tue, 2 Sep 2014 16:04:25 +0200
4 Subject: [PATCH] Do not set gcrypt thread callback
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Setting gcrypt thread callback is only for older versions of gcrypt
10 which is not our case.
11
12 Related patch on gnupg project:
13 https://gitorious.org/gnupg/mainline/commit/a2d9e48fcca6cfc2dfadef6dbd3579a30314676b
14
15 Signed-off-by: Kévin THIERRY <kevin.thierry@open.eurogiciel.org>
16 ---
17  agent/gpg-agent.c | 17 -----------------
18  scd/scdaemon.c    | 16 ----------------
19  2 files changed, 33 deletions(-)
20
21 diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
22 index b00d899..2634016 100644
23 --- a/agent/gpg-agent.c
24 +++ b/agent/gpg-agent.c
25 @@ -277,12 +277,6 @@ static int check_for_running_agent (int silent, int mode);
26  /* Pth wrapper function definitions. */
27  ASSUAN_SYSTEM_PTH_IMPL;
28  
29 -GCRY_THREAD_OPTION_PTH_IMPL;
30 -static int fixed_gcry_pth_init (void)
31 -{
32 -  return pth_self ()? 0 : (pth_init () == FALSE) ? errno : 0;
33 -}
34 -
35  
36  #ifndef PTH_HAVE_PTH_THREAD_ID
37  static unsigned long pth_thread_id (void)
38 @@ -592,17 +586,6 @@ main (int argc, char **argv )
39    init_common_subsystems ();
40  
41  
42 -  /* Libgcrypt requires us to register the threading model first.
43 -     Note that this will also do the pth_init. */
44 -  gcry_threads_pth.init = fixed_gcry_pth_init;
45 -  err = gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pth);
46 -  if (err)
47 -    {
48 -      log_fatal ("can't register GNU Pth with Libgcrypt: %s\n",
49 -                 gpg_strerror (err));
50 -    }
51 -
52 -
53    /* Check that the libraries are suitable.  Do it here because
54       the option parsing may need services of the library. */
55    if (!gcry_check_version (NEED_LIBGCRYPT_VERSION) )
56 diff --git a/scd/scdaemon.c b/scd/scdaemon.c
57 index 064d342..320e2c7 100644
58 --- a/scd/scdaemon.c
59 +++ b/scd/scdaemon.c
60 @@ -205,12 +205,6 @@ static void handle_connections (int listen_fd);
61  /* Pth wrapper function definitions. */
62  ASSUAN_SYSTEM_PTH_IMPL;
63  
64 -GCRY_THREAD_OPTION_PTH_IMPL;
65 -static int fixed_gcry_pth_init (void)
66 -{
67 -  return pth_self ()? 0 : (pth_init () == FALSE) ? errno : 0;
68 -}
69 -
70  
71  \f
72  static char *
73 @@ -407,16 +401,6 @@ main (int argc, char **argv )
74    init_common_subsystems ();
75  
76  
77 -  /* Libgcrypt requires us to register the threading model first.
78 -     Note that this will also do the pth_init. */
79 -  gcry_threads_pth.init = fixed_gcry_pth_init;
80 -  err = gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pth);
81 -  if (err)
82 -    {
83 -      log_fatal ("can't register GNU Pth with Libgcrypt: %s\n",
84 -                 gpg_strerror (err));
85 -    }
86 -
87    /* Check that the libraries are suitable.  Do it here because
88       the option parsing may need services of the library */
89    if (!gcry_check_version (NEED_LIBGCRYPT_VERSION) )
90 -- 
91 1.8.1.4
92