From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id E8E7C6DE278A for ; Mon, 17 Jul 2017 08:06:28 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.005 X-Spam-Level: X-Spam-Status: No, score=0.005 tagged_above=-999 required=5 tests=[AWL=0.004, HEADER_FROM_DIFFERENT_DOMAINS=0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JLEervZrGEio for ; Mon, 17 Jul 2017 08:06:28 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 2BE6C6DE26ED for ; Mon, 17 Jul 2017 08:06:28 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1dX7YC-0003EU-0X; Mon, 17 Jul 2017 11:03:08 -0400 Received: (nullmailer pid 18002 invoked by uid 1000); Mon, 17 Jul 2017 15:06:15 -0000 From: David Bremner To: notmuch@notmuchmail.org, notmuch@freelists.org Subject: [PATCH 1/4] util: make g_mime_utils_header_decode_date_unix match prototype Date: Mon, 17 Jul 2017 12:06:09 -0300 Message-Id: <20170717150612.17933-2-david@tethera.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170717150612.17933-1-david@tethera.net> References: <20170717150612.17933-1-david@tethera.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 15:06:29 -0000 The problem shows up on 32 bit architectures where sizeof(time_t) != sizeof(gint64). Upcasting the 32 bit time_t to a 64 bit integer should hopefully be safe. --- util/gmime-extra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/gmime-extra.c b/util/gmime-extra.c index ed53e0ab..901d4d56 100644 --- a/util/gmime-extra.c +++ b/util/gmime-extra.c @@ -100,9 +100,9 @@ g_mime_signature_status_error (GMimeSignatureError error) { return (error != GMIME_SIGNATURE_ERROR_NONE); } -time_t +gint64 g_mime_utils_header_decode_date_unix (const char *date) { - return g_mime_utils_header_decode_date (date, NULL); + return (gint64) g_mime_utils_header_decode_date (date, NULL); } #else /* GMime >= 3.0 */ -- 2.11.0