]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_6] win32 portability fix
authorEvan Hunt <each@isc.org>
Mon, 18 Nov 2013 23:48:03 +0000 (15:48 -0800)
committerEvan Hunt <each@isc.org>
Mon, 18 Nov 2013 23:48:03 +0000 (15:48 -0800)
(cherry picked from commit 2b579866035a093b692bbb5d06399e70063ed1cd)

bin/dig/dighost.c

index 15d58d7c31772c142cb24bd3390d28b42a158f30..6e2043cb07f5f875c940f91ada758e934f06d65f 100644 (file)
@@ -517,14 +517,14 @@ fatal(const char *format, ...) {
 void
 debug(const char *format, ...) {
        va_list args;
+       isc_time_t t;
 
        if (debugging) {
                fflush(stdout);
                if (debugtiming) {
-                       struct timeval tv;
-                       (void)gettimeofday(&tv, NULL);
-                       fprintf(stderr, "%ld.%06ld: ", (long)tv.tv_sec,
-                               (long)tv.tv_usec);
+                       TIME_NOW(&t);
+                       fprintf(stderr, "%d.%06d: ",
+                               t.seconds, t.nanoseconds / 1000);
                }
                va_start(args, format);
                vfprintf(stderr, format, args);