Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Mar 2011 15:00:17 -0800
From:      Milo Hyson <>
Subject:   Bug in routed?
Message-ID:  <>

Next in thread | Raw E-Mail | Index | Archive | Help
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 =
 						  " %ld seconds; forget =
-						  (long)now.tv_sec-
-						      ifp->int_data.ts);
+						  (long)(now.tv_sec-
+						      =

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.

Want to link to this message? Use this URL: <>