[gnome-keyring] gcr: Compatiblity fix for glib 2.28.x
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring] gcr: Compatiblity fix for glib 2.28.x
- Date: Tue, 27 Sep 2011 07:22:38 +0000 (UTC)
commit f6e3f6636c7210c1fe1766fcad2b128ef8a656a8
Author: Stef Walter <stefw collabora co uk>
Date: Tue Sep 27 09:19:18 2011 +0200
gcr: Compatiblity fix for glib 2.28.x
gcr/gcr-library.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gcr/gcr-library.c b/gcr/gcr-library.c
index b887ba3..409f6b4 100644
--- a/gcr/gcr-library.c
+++ b/gcr/gcr-library.c
@@ -115,7 +115,11 @@ _gcr_initialize_library (void)
{
static gint gcr_initialize = 0;
+#if GLIB_CHECK_VERSION (2,30,0)
if (g_atomic_int_add (&gcr_initialize, 1) == 0)
+#else
+ if (g_atomic_int_exchange_and_add (&gcr_initialize, 1) == 0)
+#endif
return;
/* Initialize the libgcrypt library if needed */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]