BIND 10 master, updated. 235a2af717e4eed8599d5b4051d1b62e27888a4b [master]Merge branch 'trac1526'

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Dec 22 18:00:30 UTC 2011


The branch, master has been updated
       via  235a2af717e4eed8599d5b4051d1b62e27888a4b (commit)
       via  d2c410cd67c37b1f27bb7121ecc7aa273df02015 (commit)
       via  a2120b04405184479b27b52d30cab38903b6f83c (commit)
       via  102355de8ca47e80fcf3bc2a884f36907b7b7922 (commit)
       via  dd6f8bdc0f67c83aea2f91cd56c21a4b822d735b (commit)
       via  d12104290629bd4f3c2e9edbc1b4139d337afeeb (commit)
      from  6718ccfa5f7ca499473590aa0a8618ec7adca46e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 235a2af717e4eed8599d5b4051d1b62e27888a4b
Merge: 6718ccfa5f7ca499473590aa0a8618ec7adca46e d2c410cd67c37b1f27bb7121ecc7aa273df02015
Author: Jeremy C. Reed <jreed at ISC.org>
Date:   Thu Dec 22 12:00:23 2011 -0600

    [master]Merge branch 'trac1526'

-----------------------------------------------------------------------

Summary of changes:
 configure.ac                     |    4 ++++
 tests/tools/perfdhcp/Makefile.am |    3 ++-
 tests/tools/perfdhcp/perfdhcp.c  |   30 ++++++++++++++++++++++++++++++
 3 files changed, 36 insertions(+), 1 deletions(-)

-----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index ac13b80..838738b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -831,6 +831,10 @@ EV_SET(NULL, 0, 0, 0, 0, 0, udata);],
 	])
 fi
 
+CLOCK_GETTIME_LDFLAGS=
+AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_GETTIME_LDFLAGS=-lrt], [])
+AC_SUBST([CLOCK_GETTIME_LDFLAGS])
+
 # /dev/poll issue: ASIO uses /dev/poll by default if it's available (generally
 # the case with Solaris).  Unfortunately its /dev/poll specific code would
 # trigger the gcc's "missing-field-initializers" warning, which would
diff --git a/tests/tools/perfdhcp/Makefile.am b/tests/tools/perfdhcp/Makefile.am
index 0707e61..bbad595 100644
--- a/tests/tools/perfdhcp/Makefile.am
+++ b/tests/tools/perfdhcp/Makefile.am
@@ -2,7 +2,8 @@ SUBDIRS = .
 
 AM_CXXFLAGS = $(B10_CXXFLAGS)
 
-AM_LDFLAGS = -lrt -lm
+AM_LDFLAGS = $(CLOCK_GETTIME_LDFLAGS)
+AM_LDFLAGS += -lm
 if USE_STATIC_LINK
 AM_LDFLAGS += -static
 endif
diff --git a/tests/tools/perfdhcp/perfdhcp.c b/tests/tools/perfdhcp/perfdhcp.c
index 4ae1544..b987a3b 100644
--- a/tests/tools/perfdhcp/perfdhcp.c
+++ b/tests/tools/perfdhcp/perfdhcp.c
@@ -362,6 +362,36 @@ size_t random_request6;
 size_t serverid_request6;
 size_t reqaddr_request6;
 
+
+// use definition of CLOCK_REALTIME (or lack of thereof) as an indicator
+// if the code is being compiled or Linux (or somewhere else)
+// Perhaps this should be based on OS_LINUX define?
+
+#if !defined (CLOCK_REALTIME)
+#define CLOCK_REALTIME 0
+
+/// @brief clock_gettime implementation for non-Linux systems
+///
+/// This implementation lacks nanosecond resolution. It is intended
+/// to be used on non-Linux systems that does not provide clock_gettime
+/// implementation.
+///
+/// @param clockid ignored (kept for Linux prototype compatibility)
+/// @param tp timespec structure
+///
+/// @return always zero (kept for compatibility reasons)
+int clock_gettime(int clockid, struct timespec *tp) {
+
+    struct timeval tv;
+    gettimeofday(&tv, NULL);
+    tp->tv_sec = tv.tv_sec;
+    tp->tv_nsec = tv.tv_usec*1000;
+
+    return (0);
+}
+
+#endif
+
 /*
  * initialize data structures handling exchanges
  */




More information about the bind10-changes mailing list