From nobody@FreeBSD.org  Tue Mar  8 00:19:18 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 108931065672
	for <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <milo@cyberlifelabs.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: if.c in routed fails to compile if time_t and long are different sizes
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         155365
>Category:       bin
>Synopsis:       [patch] routed(8): if.c in routed fails to compile if time_t and long are different sizes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-net
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 08 00:20:10 UTC 2011
>Closed-Date:    Tue Nov 01 03:25:47 UTC 2011
>Last-Modified:  Tue Nov 01 03:25:47 UTC 2011
>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:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Mar 8 00:26:44 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=155365 
State-Changed-From-To: open->closed 
State-Changed-By: kevlo 
State-Changed-When: Tue Nov 1 03:25:20 UTC 2011 
State-Changed-Why:  
Fixed in r204405 

http://www.freebsd.org/cgi/query-pr.cgi?pr=155365 
>Unformatted:
