From patchwork Fri Feb 16 02:45:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steffan Karger X-Patchwork-Id: 234 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director11.mail.ord1d.rsapps.net ([172.27.255.57]) by backend30.mail.ord1d.rsapps.net (Dovecot) with LMTP id uzzDLrS4iVoEbgAAIUCqbw for ; Sun, 18 Feb 2018 12:32:36 -0500 Received: from proxy13.mail.iad3a.rsapps.net ([172.27.255.57]) by director11.mail.ord1d.rsapps.net (Dovecot) with LMTP id +S5zIrS4iVp3dQAAvGGmqA ; Sun, 18 Feb 2018 12:32:36 -0500 Received: from smtp42.gate.iad3a ([172.27.255.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy13.mail.iad3a.rsapps.net (Dovecot) with LMTP id +jGDJbS4iVrZIQAAwhxzoA ; Sun, 18 Feb 2018 12:32:36 -0500 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp42.gate.iad3a.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=fox-it.com X-Classification-ID: b547c054-14d1-11e8-82ca-782bcb4244d8-1-1 Received: from [216.105.38.7] ([216.105.38.7:5709] helo=lists.sourceforge.net) by smtp42.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.1.56364 r(Core:4.2.1.14)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 01/93-05386-4B8B98A5; Sun, 18 Feb 2018 12:32:36 -0500 Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.89) (envelope-from ) id 1enSoT-0009L7-R9; Sun, 18 Feb 2018 17:31:45 +0000 Received: from siteops-lb-1.v20.lw.sourceforge.com ([172.30.20.11] helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1emgL5-0008Ir-2j for openvpn-devel@lists.sourceforge.net; Fri, 16 Feb 2018 13:46:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:MIME-Version:Message-ID:Date:Subject: CC:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=QKTLEZbZQblLi/v6tlUV8sOKMr3wG/6S6koeeYkcmcg=; b=KGycg9P4Z4Fcma2ytP7zSi4dVh befczm82LZ9nsAs7og+Hgr6PTbE6EVoIDEy9+vgpdIxWxa574aPFQLpfwThruW033W4pEVyMtSw7U yGXAY+DnTDcIlCVCbIGJU+QjWbBmWiBE6pxWgLIH7by2/ZU9Wxdn9sdJ2n8REr8bydcY=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From:Sender: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=QKTLEZbZQblLi/v6tlUV8sOKMr3wG/6S6koeeYkcmcg=; b=Y Dx8jvRkQjmhokpewEzc4qqqsSn3aVNOsvjH7wcG94jeg3IsG39dipZDn0BwE27upiF8G2curmo/kQ aCmvy0p21dm1ealInaFsg148sroUzgaQ9bpU7Myk/kGZIauvS/q5RhKrsX95diGz1OG2dtEJEyeBE xO48sWychM4r9T8Y=; Received: from [172.30.20.11] (helo=ns2.fox-it.com) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1:ECDHE-RSA-AES256-SHA:256) (Exim 4.89) id 1emgL4-0003ge-Qt for openvpn-devel@lists.sourceforge.net; Fri, 16 Feb 2018 13:46:11 +0000 Received: from FOXDFT52.FOX.local (unknown [10.0.0.129]) by ns2.fox-it.com (Postfix) with ESMTPS id 75C2B1AF8C0 for ; Fri, 16 Feb 2018 14:46:09 +0100 (CET) Received: from steffan-fox.fox.local (10.0.3.178) by FOXDFT52.FOX.local (10.0.0.129) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Fri, 16 Feb 2018 14:46:09 +0100 From: Steffan Karger To: Date: Fri, 16 Feb 2018 14:45:39 +0100 Message-ID: <1518788739-16610-1-git-send-email-steffan.karger@fox-it.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-ClientProxiedBy: FOXDFT52.FOX.local (10.0.0.129) To FOXDFT52.FOX.local (10.0.0.129) Subject: [Openvpn-devel] [PATCH] Fix format errors when cross-compiling for Windows X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox Not all supported windows formatting libs are C99 compliant and some do not grasp %ll (similar to %zu). Use int64_t and PRIi64 to work around that. Signed-off-by: Steffan Karger Acked-by: Selva Nair --- src/openvpn/error.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openvpn/error.c b/src/openvpn/error.c index bf987d2..bc14e8c 100644 --- a/src/openvpn/error.c +++ b/src/openvpn/error.c @@ -342,8 +342,8 @@ x_msg_va(const unsigned int flags, const char *format, va_list arglist) struct timeval tv; gettimeofday(&tv, NULL); - fprintf(fp, "%lld.%06lu %x %s%s%s%s", - (long long)tv.tv_sec, + fprintf(fp, "%"PRIi64".%06lu %x %s%s%s%s", + (int64_t)tv.tv_sec, (unsigned long)tv.tv_usec, flags, prefix,