unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: David Bremner <david@tethera.net>,
	Michael J Gruber <git@grubix.eu>,
	notmuch@notmuchmail.org
Subject: [PATCH] fix build failure with glib 2.67
Date: Mon, 15 Feb 2021 16:59:17 -0400	[thread overview]
Message-ID: <20210215205917.180301-1-david@tethera.net> (raw)
In-Reply-To: <20210213212214.3344212-1-david@tethera.net>

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 <stdlib.h>
@@ -47,14 +53,6 @@ NOTMUCH_BEGIN_DECLS
 
 #include <talloc.h>
 
-#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

  reply	other threads:[~2021-02-15 20:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-11 14:51 [PATCH] fix FTBFS with glib Michael J Gruber
2021-02-12 12:57 ` David Bremner
2021-02-12 15:01   ` Michael J Gruber
2021-02-12 18:48 ` Tomi Ollila
2021-02-12 19:51   ` Michael J Gruber
2021-02-13 21:22 ` [PATCH] fix build failure with glib 2.67 David Bremner
2021-02-15 20:59   ` David Bremner [this message]
2021-02-15 21:29     ` Michael J Gruber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210215205917.180301-1-david@tethera.net \
    --to=david@tethera.net \
    --cc=git@grubix.eu \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).