]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix compilation of libvirt against xen-unstable
authorJim Fehlig <jfehlig@novell.com>
Sun, 15 Nov 2009 08:40:36 +0000 (09:40 +0100)
committerDaniel Veillard <veillard@redhat.com>
Sun, 15 Nov 2009 08:40:36 +0000 (09:40 +0100)
* src/xen/xen_hypervisor.c: xen-unstable changeset 19788 removed
  MAX_VIRT_CPUS from public headers, breaking compilation of libvirt
  on -unstable.  Its semanitc was retained with XEN_LEGACY_MAX_VCPUS.
  Ensure MAX_VIRT_CPUS is defined accordingly.

src/xen/xen_hypervisor.c

index 6d8bfdd5170c7a321d38e9fd229eebdd41248873..843102a7231e9b3434ac7b7bcbe55881a685beba 100644 (file)
@@ -109,6 +109,14 @@ typedef privcmd_hypercall_t hypercall_t;
 #define SYS_IFACE_MIN_VERS_NUMA 4
 #endif
 
+/* xen-unstable changeset 19788 removed MAX_VIRT_CPUS from public
+ * headers.  Its semanitc was retained with XEN_LEGACY_MAX_VCPUS.
+ * Ensure MAX_VIRT_CPUS is defined accordingly.
+ */
+#if !defined(MAX_VIRT_CPUS) && defined(XEN_LEGACY_MAX_VCPUS)
+#define MAX_VIRT_CPUS XEN_LEGACY_MAX_VCPUS
+#endif
+
 static int xen_ioctl_hypercall_cmd = 0;
 static int initialized = 0;
 static int in_init = 0;