$NetBSD: patch-cg,v 1.2 2007/11/17 16:45:32 bouyer Exp $

--- xenstat/xentop/xentop.c.orig	2007-05-18 16:45:21.000000000 +0200
+++ xenstat/xentop/xentop.c	2007-11-17 14:50:57.000000000 +0100
@@ -18,7 +18,8 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include <curses.h>
+#include <ncurses.h>
+#define vw_printw vwprintw
 #include <ctype.h>
 #include <errno.h>
 #include <stdio.h>
@@ -28,7 +29,11 @@
 #include <sys/time.h>
 #include <time.h>
 #include <unistd.h>
+#ifndef __NetBSD__
 #include <linux/kdev_t.h>
+#else
+#include <stdarg.h>
+#endif
 
 #include <xenstat.h>
 
@@ -740,10 +745,11 @@
 	unsigned i, num_domains = 0;
 	unsigned long long used = 0;
 	xenstat_domain *domain;
+	time_t curt;
 
 	/* Print program name, current time, and number of domains */
-	strftime(time_str, TIME_STR_LEN, TIME_STR_FORMAT,
-	         localtime(&curtime.tv_sec));
+	curt = curtime.tv_sec;
+	strftime(time_str, TIME_STR_LEN, TIME_STR_FORMAT, localtime(&curt));
 	num_domains = xenstat_node_num_domains(cur_node);
 	ver_str = xenstat_node_xen_version(cur_node);
 	print("xentop - %s   Xen %s\n", time_str, ver_str);
@@ -909,6 +915,7 @@
 /* Output all VBD information */
 void do_vbd(xenstat_domain *domain)
 {
+#ifdef notyet
 	int i = 0;
 	xenstat_vbd *vbd;
 	unsigned num_vbds = 0;
@@ -933,6 +940,7 @@
 		      xenstat_vbd_rd_reqs(vbd),
 		      xenstat_vbd_wr_reqs(vbd));
 	}
+#endif
 }
 
 static void top(void)
