pkgsrc/sysutils/xentools3/patches/patch-cg
joerg 8f28de81a1 Allow building Xen infrastructure with Clang. Fix various bugs in
xenkernel3, xenkernel41, xentools3 and xentools41 exposed by Clang
default warnings. Bump revisions for those.
2013-04-11 19:57:51 +00:00

65 lines
1.7 KiB
Text

$NetBSD: patch-cg,v 1.3 2013/04/11 19:57:52 joerg Exp $
--- xenstat/xentop/xentop.c.orig 2008-04-25 13:03:12.000000000 +0000
+++ xenstat/xentop/xentop.c
@@ -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>
@@ -251,7 +256,7 @@ static void fail(const char *str)
{
if(cwin != NULL && !isendwin())
endwin();
- fprintf(stderr, str);
+ fprintf(stderr, "%s", str);
exit(1);
}
@@ -752,10 +757,11 @@ void do_summary(void)
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);
@@ -921,6 +927,7 @@ void do_network(xenstat_domain *domain)
/* Output all VBD information */
void do_vbd(xenstat_domain *domain)
{
+#ifdef notyet
int i = 0;
xenstat_vbd *vbd;
unsigned num_vbds = 0;
@@ -952,6 +959,7 @@ void do_vbd(xenstat_domain *domain)
xenstat_vbd_rd_reqs(vbd),
xenstat_vbd_wr_reqs(vbd));
}
+#endif
}
static void top(void)