From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id aKoMCbLgKmCbNwAA0tVLHw (envelope-from ) for ; Mon, 15 Feb 2021 20:59:30 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 2d3BBLLgKmCLBQAAB5/wlQ (envelope-from ) for ; Mon, 15 Feb 2021 20:59:30 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 81FC41C539 for ; Mon, 15 Feb 2021 21:59:29 +0100 (CET) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id CAD791FD22; Mon, 15 Feb 2021 15:59:23 -0500 (EST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 6A6BF1FAEC for ; Mon, 15 Feb 2021 15:59:21 -0500 (EST) Received: by fethera.tethera.net (Postfix, from userid 1001) id 481D9606DF; Mon, 15 Feb 2021 15:59:21 -0500 (EST) Received: (nullmailer pid 180361 invoked by uid 1000); Mon, 15 Feb 2021 20:59:20 -0000 From: David Bremner To: David Bremner , Michael J Gruber , notmuch@notmuchmail.org Subject: [PATCH] fix build failure with glib 2.67 Date: Mon, 15 Feb 2021 16:59:17 -0400 Message-Id: <20210215205917.180301-1-david@tethera.net> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210213212214.3344212-1-david@tethera.net> References: <20210213212214.3344212-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: JUYCXWW6FSIY4H6HXJZ3HNAIXLLLOM42 X-Message-ID-Hash: JUYCXWW6FSIY4H6HXJZ3HNAIXLLLOM42 X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 0.55 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 81FC41C539 X-Spam-Score: 0.55 X-Migadu-Scanner: scn0.migadu.com X-TUID: pQp57GRLb+w9 Based on a patch from Michael J Gruber [1]. As of glib 2.67 (more specifically [2]), including "gmime-extra.h" inside an extern "C" block causes build failures, because glib is using C++ features. Observing that "gmime-extra.h" is no longer needed in notmuch-private.h, which can simply delete that include, but we have to correspondingly move the includes which might include it (in particular crypto.h) out of the extern "C" block also. This seems less fragile than only moving gmime-extra, and relying on preprocessor sentinels to keep the deeper includes from happening. Move to the include to the outside of the extern block. [1]: id:aee618a3d41f7889a7449aa16893e992325a909a.1613055071.git.git@grubix.eu [2]: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1715 --- I neglected to change the author when amending. No fair blaming Michael for my potential mistakes lib/notmuch-private.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h index 57ec7f72..41aff342 100644 --- a/lib/notmuch-private.h +++ b/lib/notmuch-private.h @@ -31,6 +31,12 @@ #include "notmuch.h" +#include "xutil.h" +#include "error_util.h" +#include "string-util.h" +#include "crypto.h" +#include "repair.h" + NOTMUCH_BEGIN_DECLS #include @@ -47,14 +53,6 @@ NOTMUCH_BEGIN_DECLS #include -#include "gmime-extra.h" - -#include "xutil.h" -#include "error_util.h" -#include "string-util.h" -#include "crypto.h" -#include "repair.h" - #ifdef DEBUG # define DEBUG_DATABASE_SANITY 1 # define DEBUG_THREADING 1 -- 2.30.0