From: Jani Nikula Date: Tue, 28 Oct 2014 08:17:26 +0000 (+0100) Subject: [PATCH] cli: cast timeval fields to long for format X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ad72e129917366e8dd04418c677c9b31abd4c345;p=notmuch-archives.git [PATCH] cli: cast timeval fields to long for format --- diff --git a/b9/e7bd42b74c3df886294c624509bbfcd62e6549 b/b9/e7bd42b74c3df886294c624509bbfcd62e6549 new file mode 100644 index 000000000..736853436 --- /dev/null +++ b/b9/e7bd42b74c3df886294c624509bbfcd62e6549 @@ -0,0 +1,83 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 322C5431FB6 + for ; Tue, 28 Oct 2014 01:17:11 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id kigK+XqnaCKH for ; + Tue, 28 Oct 2014 01:17:07 -0700 (PDT) +Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com + [209.85.212.176]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 75AE4431FAE + for ; Tue, 28 Oct 2014 01:17:07 -0700 (PDT) +Received: by mail-wi0-f176.google.com with SMTP id n3so8476363wiv.9 + for ; Tue, 28 Oct 2014 01:17:06 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:cc:subject:date:message-id; + bh=eRzFfNCQalOmt9JmCRep8yJFyAJ22e+Czep+17yghic=; + b=ECbS63l3FanLC1etnXKPFoDwqpiTmTgokXFlKd9NkYX4L5fIrz2epeW0uwjFX4TTj2 + wMhF/pHDdAcKKqfbxItUmwe81KfRcQQtq0CrshdmbmN8dNK6fjZqjczn1RYmoVSqDiJK + EJXdkKPoCawJX9VPS2rS8ZkcjnJq9Wah91cGLa+Q2OYLX8wB4LbffKvFTlIC52sgvXwa + hTgrXe/BXsNDToHJbHbLXtdHTsjpsVfW0jLtfLa88x0GZ3Qtx6YWAadF4yH7ZX/yTFdB + lVYhVP3tUNxI48EFPEokO/pH51tpCAK1r9FWxTR/eZZDx2Mn0qIOzNHvpXaQn7gJLpqO + x8kQ== +X-Gm-Message-State: + ALoCoQmrtdvL6XmVLBJh8X57FsWO9RTNzlQ1xu+FJG9xGkm9rtWhT+TmhQNytpksqsc3bZACTBDd +X-Received: by 10.180.76.41 with SMTP id h9mr2787026wiw.40.1414484226225; + Tue, 28 Oct 2014 01:17:06 -0700 (PDT) +Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3]) + by mx.google.com with ESMTPSA id wr9sm896934wjb.42.2014.10.28.01.17.05 + for + (version=TLSv1.1 cipher=RC4-SHA bits=128/128); + Tue, 28 Oct 2014 01:17:05 -0700 (PDT) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH] cli: cast timeval fields to long for format +Date: Tue, 28 Oct 2014 09:17:26 +0100 +Message-Id: <1414484246-19659-1-git-send-email-jani@nikula.org> +X-Mailer: git-send-email 1.7.2.5 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Tue, 28 Oct 2014 08:17:11 -0000 + +This hides platform differences between struct timeval field types. +--- + notmuch-insert.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/notmuch-insert.c b/notmuch-insert.c +index 7074077..0d2d810 100644 +--- a/notmuch-insert.c ++++ b/notmuch-insert.c +@@ -197,7 +197,7 @@ tempfilename (const void *ctx) + gettimeofday (&tv, NULL); + + filename = talloc_asprintf (ctx, "%ld.M%ldP%d.%s", +- tv.tv_sec, tv.tv_usec, pid, hostname); ++ (long) tv.tv_sec, (long) tv.tv_usec, pid, hostname); + if (! filename) + fprintf (stderr, "Error: %s\n", strerror (ENOMEM)); + +-- +1.7.2.5 +