]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Remove knowledge of HAVE_CLOCK_MONTONIC 55/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Sun, 8 Jan 2017 00:23:50 +0000 (19:23 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Sun, 8 Jan 2017 00:23:50 +0000 (19:23 -0500)
thread.c fails to build properly on systems that do
not have a CLOCK_MONOTONIC.  Therefore there is
no need for bgp to have knowledge of it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_dump.c
bgpd/bgp_nexthop.c
bgpd/bgp_route.c
bgpd/bgpd.h

index add653193c0660e3945a9076418a38319650f880..8dd753d272a5e678d48f76cf9575530b98f575bf 100644 (file)
@@ -364,11 +364,7 @@ bgp_dump_route_node_record (int afi, struct bgp_node *rn,
     stream_putw (obuf, info->peer->table_dump_index);
 
     /* Originated */
-#ifdef HAVE_CLOCK_MONOTONIC
     stream_putl (obuf, time(NULL) - (bgp_clock() - info->uptime));
-#else
-    stream_putl (obuf, info->uptime);
-#endif /* HAVE_CLOCK_MONOTONIC */
 
     /* Dump attribute. */
     /* Skip prefix & AFI/SAFI for MP_NLRI */
index 0a72d09228ece93c4e16d98820b3992546d4d933..2cbcc37d67d27ca5c9c76c6f585762f66d79edd1 100644 (file)
@@ -450,12 +450,8 @@ bgp_show_nexthops (struct vty *vty, struct bgp *bgp, int detail)
                  if (CHECK_FLAG(bnc->flags, BGP_NEXTHOP_CONNECTED))
                    vty_out (vty, "  Must be Connected%s", VTY_NEWLINE);
                }
-#ifdef HAVE_CLOCK_MONOTONIC
              tbuf = time(NULL) - (bgp_clock() - bnc->last_update);
              vty_out (vty, "  Last update: %s", ctime(&tbuf));
-#else
-             vty_out (vty, "  Last update: %s", ctime(&bnc->uptime));
-#endif /* HAVE_CLOCK_MONOTONIC */
              vty_out(vty, "%s", VTY_NEWLINE);
            }
        }
index cfc4ec34077f8a4b3c6de5ef1f5ab7b10b21317d..c0cea6261c0fab5ec2bd99a69e1bf52dae957002 100644 (file)
@@ -6537,9 +6537,7 @@ 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
   json_object *json_bestpath = NULL;
   json_object *json_cluster_list = NULL;
   json_object *json_cluster_list_list = NULL;
@@ -7164,7 +7162,6 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,
         }
 
       /* Line 8 display Uptime */
-#ifdef HAVE_CLOCK_MONOTONIC
       tbuf = time(NULL) - (bgp_clock() - binfo->uptime);
       if (json_paths)
         {
@@ -7175,17 +7172,6 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,
         }
       else
         vty_out (vty, "      Last update: %s", ctime(&tbuf));
-#else
-      if (json_paths)
-        {
-          json_last_update = json_object_new_object();
-          json_object_int_add(json_last_update, "epoch", tbuf);
-          json_object_string_add(json_last_update, "string", ctime(&binfo->uptime));
-          json_object_object_add(json_path, "lastUpdate", json_last_update);
-        }
-      else
-        vty_out (vty, "      Last update: %s", ctime(&binfo->uptime));
-#endif /* HAVE_CLOCK_MONOTONIC */
     }
 
   /* We've constructed the json object for this path, add it to the json
index 86fa207b6b7f4ae694acbbe01ebb600449004c9f..7e2ed18c26e5ce66bf224367852c95c23b59e463 100644 (file)
@@ -1458,13 +1458,9 @@ peer_group_af_configured (struct peer_group *group)
 static inline char *
 timestamp_string (time_t ts)
 {
-#ifdef HAVE_CLOCK_MONOTONIC
   time_t tbuf;
   tbuf = time(NULL) - (bgp_clock() - ts);
   return ctime(&tbuf);
-#else
-  return ctime(&ts);
-#endif /* HAVE_CLOCK_MONOTONIC */
 }
 
 static inline int