On 06/17/2011 04:22 AM, Osier Yang wrote: > +#if HAVE_NUMACTL > +static int > +qemuProcessInitNumaMemoryPolicy(virDomainObjPtr vm) > +{ > + struct bitmask *mask = NULL; > + > + if (VIR_ALLOC(mask) < 0) { On RHEL 5, I'm getting compilation failures: qemu/qemu_process.c: In function 'qemuProcessInitNumaMemoryPolicy': qemu/qemu_process.c:1211: error: dereferencing pointer to incomplete type ... qemu/qemu_process.c:1260: warning: passing argument 1 of 'numa_set_membind' from incompatible pointer type Where is 'struct bitmask' defined? It's not in libvirt, so it is probably a struct leaked by a newer NUMA header, but not available with older NUMA headers (and if so, it's not very namespace safe, is it). On RHEL 5, 'man numa_set_membind' shows me: void numa_set_membind(nodemask_t *nodemask); On Fedora 14, numa.h has: typedef struct { unsigned long n[NUMA_NUM_NODES/(sizeof(unsigned long)*8)]; } nodemask_t; struct bitmask { unsigned long size; /* number of bits in the map */ unsigned long *maskp; }; Sounds like we need to use the various nodemask_* functions (in the older numa.h, they directly operate on nodemask_t; in the newer numa.h, they are compatibility wrappers that convert to the newer struct bitmask). -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list