[libvirt] [PATCH] Fix compilation on older sanlock

Daniel Veillard veillard at redhat.com
Mon Jun 25 10:34:38 UTC 2012


This is clearly not ideal, but we ought to check the version of sanlock
and act accordingly. We may end up with autoconf.ac and libvirt.spec.in
change for the real fix.
Pushing under the build breaker rule

Temporary fix since compilation broke with older version of
sanlock following acbd4965c44c4dbc676dfe89aff970052e376073

diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c
index 16941c9..9668ca9 100644
--- a/src/locking/lock_driver_sanlock.c
+++ b/src/locking/lock_driver_sanlock.c
@@ -55,6 +55,14 @@
 
 #define VIR_LOCK_MANAGER_SANLOCK_AUTO_DISK_LOCKSPACE "__LIBVIRT__DISKS__"
 
+/*
+ * temporary fix for the case where the sanlock devel package is
+ * too old to provide that define, and probably the functionality too
+ */
+#ifndef SANLK_RES_SHARED
+#define SANLK_RES_SHARED    0x4
+#endif
+
 typedef struct _virLockManagerSanlockDriver virLockManagerSanlockDriver;
 typedef virLockManagerSanlockDriver *virLockManagerSanlockDriverPtr;
 

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list