2005-11-04 Paul Jakma <paul.jakma@sun.com>

	* ospf_{dump,spf,vty}.c: Oops, use the internal tv_sub
	  function rather than unportable timersub.
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index a8ce2f5..7b77cb4 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-04 Paul Jakma <paul.jakma@sun.com>
+
+	* ospf_{dump,spf,vty}.c: Oops, use the internal tv_sub
+	  function rather than unportable timersub.
+
 2005-11-03 Paul Jakma <paul.jakma@sun.com>
 
 	* ospf_apiserver.c: (apiserver_sync_callback) stray semi-colon
@@ -6,7 +11,7 @@
 	* ospf_te.h: Add braces, quell warning.
 	* ospf_packet.c: Change level of some warnings to
 	  informational.
-	  
+
 2005-10-29 Paul Jakma <paul.jakma@sun.com>
 
 	* (general) RFC3137 stub-router support
diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c
index 2cccc14..859e3bc 100644
--- a/ospfd/ospf_dump.c
+++ b/ospfd/ospf_dump.c
@@ -297,12 +297,10 @@
 ospf_timer_dump (struct thread *t, char *buf, size_t size)
 {
   struct timeval result;
-  
   if (!t)
     return "inactive";
   
-  timersub (&t->u.sands, &recent_time, &result);
-    
+  result = tv_sub (t->u.sands, recent_time);
   return ospf_timeval_dump (&result, buf, size);
 }
 
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
index f6260fb..564ae84 100644
--- a/ospfd/ospf_spf.c
+++ b/ospfd/ospf_spf.c
@@ -1171,7 +1171,7 @@
     }
   
   /* XXX Monotic timers: we only care about relative time here. */
-  timersub (&recent_time, &ospf->ts_spf, &result);
+  result = tv_sub (recent_time, ospf->ts_spf);
   
   elapsed = (result.tv_sec * 1000) + (result.tv_usec / 1000);
   ht = ospf->spf_holdtime * ospf->spf_hold_multiplier;
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index c3cc4cb..e28a89c 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -2653,7 +2653,7 @@
   vty_out (vty, " SPF algorithm ");
   if (ospf->ts_spf.tv_sec || ospf->ts_spf.tv_usec)
     {
-      timersub (&recent_time, &ospf->ts_spf, &result);
+      result = tv_sub (recent_time, ospf->ts_spf);
       vty_out (vty, "last executed %s ago%s",
                ospf_timeval_dump (&result, timebuf, sizeof (timebuf)),
                VTY_NEWLINE);