ocaml: fix ocaml xc compilation on 32 bit
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 20 May 2010 13:12:14 +0000 (14:12 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 20 May 2010 13:12:14 +0000 (14:12 +0100)
  cc1: warnings being treated as errors
  xc_lib.c: In function 'xc_domain_get_pfn_list':
  xc_lib.c:1217: error: assignment from incompatible pointer type

The XEN_DOMCTL_getmemlist interface has been 32/64 invariante since
13594:30af6cfdb05c and uint64_t is now the correct type for the PFN
list on all word sizes.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
tools/ocaml/libs/xc/xc.h
tools/ocaml/libs/xc/xc_lib.c
tools/ocaml/libs/xc/xc_stubs.c

index ac3307a1e7a66137419f27249c76dbd3e42d25cb..b541c9400342a88be71457f93eefeace117f1e46 100644 (file)
@@ -141,7 +141,7 @@ int xc_shadow_allocation_get(int handle, unsigned int domid,
 int xc_shadow_allocation_set(int handle, unsigned int domid,
                             uint32_t mb);
 int xc_domain_get_pfn_list(int handle, unsigned int domid,
-                           xen_pfn_t *pfn_array, unsigned long max_pfns);
+                           uint64_t *pfn_array, unsigned long max_pfns);
 int xc_hvm_check_pvdriver(int handle, unsigned int domid);
 
 int xc_domain_assign_device(int handle, unsigned int domid,
index 981ab7bdc9cfa35253a65f54dc8d934a5aef9251..7d33ce8ee4e0157a1487d9377087d926e4721df0 100644 (file)
@@ -1208,7 +1208,7 @@ int xc_shadow_allocation_set(int handle, unsigned int domid, uint32_t mb)
 }
 
 int xc_domain_get_pfn_list(int handle, unsigned int domid,
-                           xen_pfn_t *pfn_array, unsigned long max_pfns)
+                           uint64_t *pfn_array, unsigned long max_pfns)
 {
        int ret;
        DECLARE_DOMCTL(XEN_DOMCTL_getmemlist, domid);
index 02dc1ad87ac0965ce7de86b99cb21c4c1aa5d30f..c9fb0a83aba315dce1bb7e0f1e59a8259fc6e534 100644 (file)
@@ -952,11 +952,11 @@ CAMLprim value stub_xc_domain_get_pfn_list(value xc_handle, value domid,
        CAMLlocal2(array, v);
        unsigned long c_nr_pfns;
        long ret, i;
-       xen_pfn_t *c_array;
+       uint64_t *c_array;
 
        c_nr_pfns = Nativeint_val(nr_pfns);
 
-       c_array = malloc(sizeof(xen_pfn_t) * c_nr_pfns);
+       c_array = malloc(sizeof(uint64_t) * c_nr_pfns);
        if (!c_array)
                caml_raise_out_of_memory();