Fix build with NetBSD's current gcc 4.1.2. Bump PKGREVISION to 9. Approved by maintainer.
47 lines
1.6 KiB
Text
47 lines
1.6 KiB
Text
$NetBSD: patch-an,v 1.3 2006/11/22 00:12:34 seb Exp $
|
|
|
|
--- libxc/xc_plan9_build.c.orig 2005-08-03 23:57:57.000000000 +0000
|
|
+++ libxc/xc_plan9_build.c
|
|
@@ -108,14 +108,14 @@ void
|
|
plan9header(Exec * header)
|
|
{
|
|
/* header is big-endian */
|
|
- swabby(&header->magic, "magic");
|
|
- swabby(&header->text, "text");
|
|
- swabby(&header->data, "data");
|
|
- swabby(&header->bss, "bss");
|
|
- swabby(&header->syms, "syms");
|
|
- swabby(&header->entry, "entry");
|
|
- swabby(&header->spsz, "spsz");
|
|
- swabby(&header->pcsz, "pcsz");
|
|
+ swabby((unsigned long *)&header->magic, "magic");
|
|
+ swabby((unsigned long *)&header->text, "text");
|
|
+ swabby((unsigned long *)&header->data, "data");
|
|
+ swabby((unsigned long *)&header->bss, "bss");
|
|
+ swabby((unsigned long *)&header->syms, "syms");
|
|
+ swabby((unsigned long *)&header->entry, "entry");
|
|
+ swabby((unsigned long *)&header->spsz, "spsz");
|
|
+ swabby((unsigned long *)&header->pcsz, "pcsz");
|
|
|
|
}
|
|
|
|
@@ -205,8 +205,8 @@ setup_guestos(int xc_handle,
|
|
unsigned long ksize;
|
|
mmu_t *mmu = NULL;
|
|
int i;
|
|
- unsigned long first_page_after_kernel,
|
|
- first_data_page,
|
|
+ unsigned long first_page_after_kernel = 0,
|
|
+ first_data_page = 0,
|
|
page_array_page;
|
|
unsigned long cpu0pdb, cpu0pte, cpu0ptelast;
|
|
unsigned long /*last_pfn, */ tot_pte_pages;
|
|
@@ -431,7 +431,7 @@ setup_guestos(int xc_handle,
|
|
start_info->flags = 0;
|
|
DPRINTF((" control event channel is %d\n", control_evtchn));
|
|
start_info->domain_controller_evtchn = control_evtchn;
|
|
- strncpy(start_info->cmd_line, cmdline, MAX_CMDLINE);
|
|
+ strncpy((char *)start_info->cmd_line, cmdline, MAX_CMDLINE);
|
|
start_info->cmd_line[MAX_CMDLINE - 1] = '\0';
|
|
munmap(start_info, PAGE_SIZE);
|
|
|