diff options
Diffstat (limited to 'egg')
-rw-r--r-- | egg/egg-libgcrypt.c | 3 | ||||
-rw-r--r-- | egg/egg-secure-memory.h | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/egg/egg-libgcrypt.c b/egg/egg-libgcrypt.c index efb7372e..3d8f95bf 100644 --- a/egg/egg-libgcrypt.c +++ b/egg/egg-libgcrypt.c @@ -100,8 +100,7 @@ egg_libgcrypt_initialize (void) /* Only initialize libgcrypt if it hasn't already been initialized */ if (!gcry_control (GCRYCTL_INITIALIZATION_FINISHED_P)) { - if (g_thread_supported()) - gcry_control (GCRYCTL_SET_THREAD_CBS, &glib_thread_cbs); + gcry_control (GCRYCTL_SET_THREAD_CBS, &glib_thread_cbs); gcry_check_version (LIBGCRYPT_VERSION); gcry_set_log_handler (log_handler, NULL); gcry_set_outofcore_handler (no_mem_handler, NULL); diff --git a/egg/egg-secure-memory.h b/egg/egg-secure-memory.h index 969dbd73..51815511 100644 --- a/egg/egg-secure-memory.h +++ b/egg/egg-secure-memory.h @@ -57,11 +57,11 @@ typedef struct { lock, unlock, fallback, NULL, EGG_SECURE_POOL_VER_STR }; #define EGG_SECURE_DEFINE_GLIB_GLOBALS() \ - static GStaticMutex memory_mutex = G_STATIC_MUTEX_INIT; \ + static GMutex memory_mutex = { 0, }; \ static void egg_memory_lock (void) \ - { g_static_mutex_lock (&memory_mutex); } \ + { g_mutex_lock (&memory_mutex); } \ static void egg_memory_unlock (void) \ - { g_static_mutex_unlock (&memory_mutex); } \ + { g_mutex_unlock (&memory_mutex); } \ EGG_SECURE_DEFINE_GLOBALS (egg_memory_lock, egg_memory_unlock, g_realloc); extern egg_secure_glob EGG_SECURE_GLOBALS; |