summaryrefslogtreecommitdiff
path: root/bgpd/bgp_route.c
diff options
context:
space:
mode:
authorPaul Jakma <paul@quagga.net>2011-03-20 22:08:02 +0000
committerPaul Jakma <paul@quagga.net>2011-03-20 22:09:15 +0000
commitd1de1c25962b5470f3825bc82d15e4dd29e1f842 (patch)
tree9e9b3c6ed51a0fdc78e0eb8900fad8f7e7598b98 /bgpd/bgp_route.c
parent4dd87df5af8a59174362e44f83df11f12457c8b4 (diff)
parente6844aa5d23cf56dd1f31afc96e8145ab188953f (diff)
Merge paul/ospfd/201012-review ospfd and lib/ fixes and performance improvements
Diffstat (limited to 'bgpd/bgp_route.c')
-rw-r--r--bgpd/bgp_route.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index df23dda3..60e9610e 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -5978,6 +5978,9 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,
char buf1[BUFSIZ];
struct attr *attr;
int sockunion_vty_out (struct vty *, union sockunion *);
+#ifdef HAVE_CLOCK_MONOTONIC
+ time_t tbuf;
+#endif
attr = binfo->attr;
@@ -6144,8 +6147,12 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,
bgp_damp_info_vty (vty, binfo);
/* Line 7 display Uptime */
- time_t tbuf = time(NULL) - (bgp_clock() - binfo->uptime);
+#ifdef HAVE_CLOCK_MONOTONIC
+ tbuf = time(NULL) - (bgp_clock() - binfo->uptime);
vty_out (vty, " Last update: %s", ctime(&tbuf));
+#else
+ vty_out (vty, " Last update: %s", ctime(&binfo->uptime));
+#endif /* HAVE_CLOCK_MONOTONIC */
}
vty_out (vty, "%s", VTY_NEWLINE);
}