--- /dev/null
+Return-Path: <too@guru-group.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 14EDA431FAF\r
+ for <notmuch@notmuchmail.org>; Fri, 7 Jun 2013 11:41:33 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id eZS5IXdGlj5i for <notmuch@notmuchmail.org>;\r
+ Fri, 7 Jun 2013 11:41:22 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 82301431FAE\r
+ for <notmuch@notmuchmail.org>; Fri, 7 Jun 2013 11:41:22 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id 8D8DE1001F1; Fri, 7 Jun 2013 21:41:16 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 1/1] cli: Guard deprecated g_type_init calls\r
+Date: Fri, 7 Jun 2013 21:41:13 +0300\r
+Message-Id: <1370630473-2033-1-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 1.8.0\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: 8bit\r
+Cc: tomi.ollila@iki.fi\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 07 Jun 2013 18:41:33 -0000\r
+\r
+g_type_init was deprecated in GLib 2.35.1. In order to compile\r
+cleanly, guard these with a suitable #if.\r
+\r
+(commit msg from https://bugs.freedesktop.org/attachment.cgi?id=73774 )\r
+---\r
+\r
+v2 of id:1370614090-1715-1-git-send-email-tomi.ollila@iki.fi\r
+\r
+database.cc was not caught by my naïve grep g_type_init **/*.c\r
+(have to learn git grep !)\r
+\r
+also added back one newline removed in v1\r
+\r
+ lib/database.cc | 2 ++\r
+ notmuch.c | 2 ++\r
+ 2 files changed, 4 insertions(+)\r
+\r
+diff --git a/lib/database.cc b/lib/database.cc\r
+index 52ed618..5cc0765 100644\r
+--- a/lib/database.cc\r
++++ b/lib/database.cc\r
+@@ -649,7 +649,9 @@ notmuch_database_open (const char *path,\r
+ }\r
+ \r
+ /* Initialize the GLib type system and threads */\r
++#if !GLIB_CHECK_VERSION(2, 35, 1)\r
+ g_type_init ();\r
++#endif\r
+ \r
+ /* Initialize gmime */\r
+ if (! initialized) {\r
+diff --git a/notmuch.c b/notmuch.c\r
+index 99ddd6d..45a73ce 100644\r
+--- a/notmuch.c\r
++++ b/notmuch.c\r
+@@ -291,7 +291,9 @@ main (int argc, char *argv[])\r
+ local = talloc_new (NULL);\r
+ \r
+ g_mime_init (0);\r
++#if !GLIB_CHECK_VERSION(2, 35, 1)\r
+ g_type_init ();\r
++#endif\r
+ \r
+ /* Globally default to the current output format version. */\r
+ notmuch_format_version = NOTMUCH_FORMAT_CUR;\r
+-- \r
+1.8.0\r
+\r