]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] win32 portability fix
authorEvan Hunt <each@isc.org>
Mon, 18 Nov 2013 23:46:24 +0000 (15:46 -0800)
committerEvan Hunt <each@isc.org>
Mon, 18 Nov 2013 23:46:24 +0000 (15:46 -0800)
bin/dig/dighost.c

index cc6c006c6c9f5a56a7ad70cdf9162296b281ee52..392fa7cdae349ca1c5672640e9710a8a72359b02 100644 (file)
@@ -541,14 +541,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);