Subject: Re: amd-64 kernel compile failure
To: NetBSD current-users mailing list <current-users@netbsd.org>
From: Julian Coleman <jdc@coris.org.uk>
List: current-users
Date: 12/06/2005 16:35:41
> A new error:
>  
> dependall ===> usr.sbin/lmcconfig
> /home/test2/current/src/usr.sbin/lmcconfig/lmcconfig.c: In function
> `print_events':

This patch should fix it.

J

  - - 8< - - - - - - - - - - - - - Cut here - - - - - - - - - - - - - >8 - -

--- lmcconfig.c.dist	2005-12-06 03:12:35.000000000 +0000
+++ lmcconfig.c	2005-12-06 16:28:36.000000000 +0000
@@ -1092,7 +1092,7 @@
   struct timezone tz;
 
   gettimeofday(&tv, &tz);
-  time = (char *)ctime((time_t *)&tv);
+  time = ctime((time_t *)&tv.tv_sec);
   printf("Current time:\t\t%s", time);
   if (status.cntrs.reset_time.tv_sec < 1000)
     time = "Never\n";
@@ -1100,10 +1100,10 @@
     time = (char *)ctime((time_t *)&status.cntrs.reset_time.tv_sec);
   printf("Cntrs reset:\t\t%s", time);
 
-  if (status.cntrs.ibytes)     printf("Rx bytes:\t\t%qu\n",    status.cntrs.ibytes);
-  if (status.cntrs.obytes)     printf("Tx bytes:\t\t%qu\n",    status.cntrs.obytes);
-  if (status.cntrs.ipackets)   printf("Rx packets:\t\t%qu\n",  status.cntrs.ipackets);
-  if (status.cntrs.opackets)   printf("Tx packets:\t\t%qu\n",  status.cntrs.opackets);
+  if (status.cntrs.ibytes)     printf("Rx bytes:\t\t%" PRIu64 "\n",    status.cntrs.ibytes);
+  if (status.cntrs.obytes)     printf("Tx bytes:\t\t%" PRIu64 "\n",    status.cntrs.obytes);
+  if (status.cntrs.ipackets)   printf("Rx packets:\t\t%" PRIu64 "\n",  status.cntrs.ipackets);
+  if (status.cntrs.opackets)   printf("Tx packets:\t\t%" PRIu64 "\n",  status.cntrs.opackets);
   if (status.cntrs.ierrors)    printf("Rx errors:\t\t%u\n",    status.cntrs.ierrors);
   if (status.cntrs.oerrors)    printf("Tx errors:\t\t%u\n",    status.cntrs.oerrors);
   if (status.cntrs.idrops)     printf("Rx drops:\t\t%u\n",     status.cntrs.idrops);

  - - 8< - - - - - - - - - - - - - Cut here - - - - - - - - - - - - - >8 - -

-- 
  My other computer also runs NetBSD    /        Sailing at Newbiggin
        http://www.netbsd.org/        /   http://www.newbigginsailingclub.org/