]> xenbits.xensource.com Git - qemu-xen-unstable.git/commitdiff
fix a compilation error if not defined MAPCACHE (eg ia64)
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 18 Sep 2009 15:31:56 +0000 (16:31 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 18 Sep 2009 15:31:56 +0000 (16:31 +0100)
60dbe1d43827cf9a57b619a8736da2319489d432 cannot be compiled on ia64:
  exec-dm.c: In function 'cpu_physical_memory_map':
  exec-dm.c:805: error: 'l' undeclared (first use in this function)
This patch fixes it.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
i386-dm/exec-dm.c

index 6ee095efc770961b801bd576b69ed3cd5ce1e9aa..d0685afd278e76e777e1c3dc15b6e10e6dc37649 100644 (file)
@@ -795,8 +795,9 @@ void *cpu_physical_memory_map(target_phys_addr_t addr,
                               target_phys_addr_t *plen,
                               int is_write)
 {
+    unsigned long l = 0;
 #ifdef MAPCACHE
-    unsigned long l = MCACHE_BUCKET_SIZE - (addr & (MCACHE_BUCKET_SIZE-1));
+    l = MCACHE_BUCKET_SIZE - (addr & (MCACHE_BUCKET_SIZE-1));
     if ((*plen) > l)
         *plen = l;
 #endif