From owner-freebsd-bugs@FreeBSD.ORG Tue Mar 8 00:20:11 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AC66106568D for ; Tue, 8 Mar 2011 00:20:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4D3868FC2D for ; Tue, 8 Mar 2011 00:20:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p280KBJ1054465 for ; Tue, 8 Mar 2011 00:20:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p280KBGb054464; Tue, 8 Mar 2011 00:20:11 GMT (envelope-from gnats) Resent-Date: Tue, 8 Mar 2011 00:20:11 GMT Resent-Message-Id: <201103080020.p280KBGb054464@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Milo Hyson Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 108931065672 for ; Tue, 8 Mar 2011 00:19:18 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id F26CA8FC0C for ; Tue, 8 Mar 2011 00:19:17 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p280JHjV041144 for ; Tue, 8 Mar 2011 00:19:17 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p280JHYB041143; Tue, 8 Mar 2011 00:19:17 GMT (envelope-from nobody) Message-Id: <201103080019.p280JHYB041143@red.freebsd.org> Date: Tue, 8 Mar 2011 00:19:17 GMT From: Milo Hyson To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/155365: if.c in routed fails to compile if time_t and long are different sizes X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2011 00:20:11 -0000 >Number: 155365 >Category: bin >Synopsis: if.c in routed fails to compile if time_t and long are different sizes >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Mar 08 00:20:10 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Milo Hyson >Release: 8.1 >Organization: CyberLife Labs, Inc. >Environment: FreeBSD time64.bellingham.cyberlifelabs.net. 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: If the size of time_t and long are not the same, building routed fails with a warning about type incompatibility with the format string, %ld. >How-To-Repeat: Given fresh sources for 8.1-RELEASE i386: 1) Change the definition of __time_t in sys/i386/include/_types.h to __int64_t. 2) make buildworld >Fix: The following patch allows the code to compile but may cause problems with loss of information should long be smaller than time_t. --- orig.c 2010-01-30 04:11:21.000000000 -0800 +++ fixed.c 2011-03-07 16:14:37.000000000 -0800 @@ -950,8 +950,8 @@ trace_act("interface %s has been off" " %ld seconds; forget it", ifp->int_name, - (long)now.tv_sec- - ifp->int_data.ts); + (long)(now.tv_sec- + ifp->int_data.ts)); ifdel(ifp); } continue; >Release-Note: >Audit-Trail: >Unformatted: