[pim] Version up to 0.161
diff --git a/lib/command.c b/lib/command.c
index 8870a42..a789b0f 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -105,7 +105,7 @@
 };
 
 /* Default motd string. */
-static const char *default_motd =
+const char *default_motd =
 "\r\n\
 Hello, this is " QUAGGA_PROGNAME " (version " QUAGGA_VERSION ").\r\n\
 " QUAGGA_COPYRIGHT "\r\n\
diff --git a/pimd/pim_main.c b/pimd/pim_main.c
index 3cf1869..2efcbb8 100644
--- a/pimd/pim_main.c
+++ b/pimd/pim_main.c
@@ -285,6 +285,12 @@
   zlog_notice("PIM_UNEXPECTED_KERNEL_UPCALL: report unexpected kernel upcall");
 #endif
 
+#ifdef HAVE_CLOCK_MONOTONIC
+  zlog_notice("HAVE_CLOCK_MONOTONIC");
+#else
+  zlog_notice("!HAVE_CLOCK_MONOTONIC");
+#endif
+
   /*
     Initialize zclient "update" and "lookup" sockets
    */
diff --git a/pimd/pim_time.c b/pimd/pim_time.c
index 63861e5..a4b1cc4 100644
--- a/pimd/pim_time.c
+++ b/pimd/pim_time.c
@@ -30,12 +30,32 @@
 
 #include "pim_time.h"
 
-/*
-  see man clock_gettime
- */
-static int pim_gettime(clockid_t clk_id, struct timeval *tv)
+static int pim_gettime(enum quagga_clkid clkid, struct timeval *tv)
 {
-  return quagga_gettime(clk_id, tv);
+  int result;
+
+  result = quagga_gettime(clkid, tv);
+  if (result) {
+    zlog_err("%s: quagga_gettime(clkid=%d) failure: errno=%d: %s",
+	     __PRETTY_FUNCTION__, clkid,
+	     errno, safe_strerror(errno));
+  }
+
+  return result;
+}
+
+static int gettime_monotonic(struct timeval *tv)
+{
+  int result;
+
+  result = pim_gettime(QUAGGA_CLK_MONOTONIC, tv);
+  if (result) {
+    zlog_err("%s: pim_gettime(QUAGGA_CLK_MONOTONIC=%d) failure: errno=%d: %s",
+	     __PRETTY_FUNCTION__, CLOCK_MONOTONIC,
+	     errno, safe_strerror(errno));
+  }
+
+  return result;
 }
 
 /*
@@ -46,8 +66,8 @@
 {
   struct timeval now_tv;
 
-  if (pim_gettime(CLOCK_MONOTONIC, &now_tv)) {
-    zlog_err("%s: gettime(CLOCK_MONOTONIC) failure: errno=%d: %s",
+  if (gettime_monotonic(&now_tv)) {
+    zlog_err("%s: gettime_monotonic() failure: errno=%d: %s",
 	     __PRETTY_FUNCTION__,
 	     errno, safe_strerror(errno));
     return -1;
@@ -65,8 +85,8 @@
   struct timeval now_tv;
   int64_t        now_dsec;
 
-  if (pim_gettime(CLOCK_MONOTONIC, &now_tv)) {
-    zlog_err("%s: gettime(CLOCK_MONOTONIC) failure: errno=%d: %s",
+  if (gettime_monotonic(&now_tv)) {
+    zlog_err("%s: gettime_monotonic() failure: errno=%d: %s",
 	     __PRETTY_FUNCTION__,
 	     errno, safe_strerror(errno));
     return -1;
diff --git a/pimd/pim_version.h b/pimd/pim_version.h
index ef75791..2734b7a 100644
--- a/pimd/pim_version.h
+++ b/pimd/pim_version.h
@@ -23,7 +23,7 @@
 #ifndef PIM_VERSION_H
 #define PIM_VERSION_H
 
-#define PIMD_VERSION_STR "0.160"
+#define PIMD_VERSION_STR "0.161"
 
 const char * const PIMD_VERSION;