[libvirt] [PATCH] Define SANLK_INQ_WAIT if missing in headers

Guido Günther agx at sigxcpu.org
Thu Dec 13 17:20:06 UTC 2012


so we can build with older sanlock (like 2.2)
---
I've applied this to the current Debian builds since we're lagging a bit
regarding sanlock but it might make sense to also support this upstream.
Cheers,
 -- Guido

 src/locking/lock_driver_sanlock.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c
index 430e11e..84f81ec 100644
--- a/src/locking/lock_driver_sanlock.c
+++ b/src/locking/lock_driver_sanlock.c
@@ -338,6 +338,9 @@ retry:
     if ((rv = sanlock_add_lockspace(&ls, 0)) < 0) {
         if (-rv == EINPROGRESS) {
 #ifdef HAVE_SANLOCK_INQ_LOCKSPACE
+#  ifndef SANLK_INQ_WAIT
+#    define SANLK_INQ_WAIT 0x00000001
+#  endif
             /* we have this function which blocks until lockspace change the
              * state. It returns 0 if lockspace has been added, -ENOENT if it
              * hasn't. XXX should we goto retry? */
-- 
1.7.10.4




More information about the libvir-list mailing list