From owner-freebsd-questions@FreeBSD.ORG Sat Mar 5 23:13:40 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 020E7106566B for ; Sat, 5 Mar 2011 23:13:40 +0000 (UTC) (envelope-from milo@cyberlifelabs.com) Received: from qmta13.westchester.pa.mail.comcast.net (qmta13.westchester.pa.mail.comcast.net [76.96.59.243]) by mx1.freebsd.org (Postfix) with ESMTP id B54868FC13 for ; Sat, 5 Mar 2011 23:13:39 +0000 (UTC) Received: from omta23.westchester.pa.mail.comcast.net ([76.96.62.74]) by qmta13.westchester.pa.mail.comcast.net with comcast id Fb0N1g0081c6gX85Db0QZR; Sat, 05 Mar 2011 23:00:24 +0000 Received: from server.bellingham.cyberlifelabs.net ([71.227.219.222]) by omta23.westchester.pa.mail.comcast.net with comcast id Fb0K1g00k4oVxvK3jb0LMZ; Sat, 05 Mar 2011 23:00:21 +0000 From: Milo Hyson Date: Sat, 5 Mar 2011 15:00:17 -0800 Message-Id: <95109270-7F98-46B3-B0A8-B0578772374A@cyberlifelabs.com> To: freebsd-questions@freebsd.org Mime-Version: 1.0 (Apple Message framework v1082) X-Mailer: Apple Mail (2.1082) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Bug in routed? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Mar 2011 23:13:40 -0000 I'm posting this in questions because 1) I'm not sure if it's really a = defect, and 2) I'm not sure what other list might be more appropriate. I've been experimenting with modifications to the i386 platform in = STABLE-8 to support 64-bit time_t values. After changing = sys/i386/include/_types.h so that __time_t is defined as __int64_t, I = received a warning when compiling sbin/routed/if.c that complained about = passing a time_t for %ld. The following patch illustrates the change I = made to fix this: --- orig/if.c 2011-03-05 14:25:47.000000000 -0800 +++ new/if.c 2011-03-05 14:26:01.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; I'm guessing the original intent here was for the result of the = subtraction to be passed as a long to trace_act(), but in actuality it's = passed as a time_t. The original code compiles just fine if time_t and = long are the same size. Additional note, this particular code fragment does not seem to exist in = -current, so the issue appears limited to -stable. - Milo Hyson Chief Scientist CyberLife Labs, Inc.