# HG changeset patch # User yamahata@xxxxxxxxxxxxx # Date 1181646175 -32400 # Node ID 96922e7acd3fad4882a9eba195678f4b239d9f9e # Parent 6897540b4f016a57f1016e060fe1a62b8683bf33 libxc trivial fix compilation error. PATCHNAME: libxc_trivial_fix_compilation Signed-off-by: Isaku Yamahata diff -r 6897540b4f01 -r 96922e7acd3f tools/libxc/ia64/xc_ia64_hvm_build.c --- a/tools/libxc/ia64/xc_ia64_hvm_build.c Tue Jun 12 19:22:34 2007 +0900 +++ b/tools/libxc/ia64/xc_ia64_hvm_build.c Tue Jun 12 20:02:55 2007 +0900 @@ -833,7 +833,7 @@ xc_ia64_setup_memmap_info(int xc_handle, assert(nr_mds <= (PAGE_SIZE * memmap_info_num_pages - - offsetof(*memmap_info, memdesc))/sizeof(*md)); + offsetof(typeof(*memmap_info), memdesc))/sizeof(*md)); memmap_info->efi_memmap_size = nr_mds * sizeof(*md); memmap_info->efi_memdesc_size = sizeof(*md); memmap_info->efi_memdesc_version = EFI_MEMORY_DESCRIPTOR_VERSION; diff -r 6897540b4f01 -r 96922e7acd3f tools/libxc/xc_dom_ia64.c --- a/tools/libxc/xc_dom_ia64.c Tue Jun 12 19:22:34 2007 +0900 +++ b/tools/libxc/xc_dom_ia64.c Tue Jun 12 20:02:55 2007 +0900 @@ -198,9 +198,9 @@ static int ia64_setup_memmap(struct xc_d num_mds++; memmap_info->efi_memmap_size = num_mds * sizeof(md[0]); munmap(memmap_info, page_size * memmap_info_num_pages); - assert(nr_mds <= + assert(num_mds <= (page_size * memmap_info_num_pages - - offsetof(*memmap_info, memdesc))/sizeof(*md)); + offsetof(typeof(*memmap_info), memdesc))/sizeof(*md)); /* * kludge: we need to pass memmap_info page's pfn and other magic pages