[gmime/gmime-2-4] Fixed build for glib < 2.18



commit 829f37385db40337e0bb713cbb1a0b51ec35e587
Author: Jeffrey Stedfast <fejj gnome org>
Date:   Mon Sep 6 18:29:39 2010 -0400

    Fixed build for glib < 2.18
    
    2010-09-06  Jeffrey Stedfast  <fejj novell com>
    
    	* gmime/gmime-gpg-context.c (g_set_error_literal): glib 2.12
    	doesn't have this function, so in order to keep our current glib
    	requirements, we need to supply our own version if
    	GLIB_MINOR_VERSION < 2.18 (which is when this function was
    	introduced).

 ChangeLog                 |    8 ++++++++
 gmime/gmime-gpg-context.c |    9 +++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5cbbd2d..9635c59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-09-06  Jeffrey Stedfast  <fejj novell com>
+
+	* gmime/gmime-gpg-context.c (g_set_error_literal): glib 2.12
+	doesn't have this function, so in order to keep our current glib
+	requirements, we need to supply our own version if
+	GLIB_MINOR_VERSION < 2.18 (which is when this function was
+	introduced).
+
 2010-09-02  Jeffrey Stedfast  <fejj novell com>
 
 	* gmime/internet-address.c (group_to_string): Don't crash if the
diff --git a/gmime/gmime-gpg-context.c b/gmime/gmime-gpg-context.c
index 4f415a9..20e0678 100644
--- a/gmime/gmime-gpg-context.c
+++ b/gmime/gmime-gpg-context.c
@@ -103,6 +103,15 @@ static int gpg_export_keys (GMimeCipherContext *ctx, GPtrArray *keys,
 static GMimeCipherContextClass *parent_class = NULL;
 
 
+#if GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 18
+static void
+g_set_error_literal (GError **err, GQuark domain, gint code, const gchar *message)
+{
+	g_set_error (err, domain, code, "%s", message);
+}
+#endif
+
+
 GType
 g_mime_gpg_context_get_type (void)
 {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]