]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix missing char dev lock path case in configure
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Wed, 5 Mar 2014 15:23:14 +0000 (19:23 +0400)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Wed, 5 Mar 2014 18:51:59 +0000 (22:51 +0400)
configure check for character devices lock path calls
AC_DEFINE_UNQUOTED for VIR_CHRDEV_LOCK_FILE_PATH even if
$with_chrdev_lock_files = "no".

So the locking code in conf/virchrdev.c:

 #ifdef VIR_CHRDEV_LOCK_FILE_PATH

is compiled in even if it shouldn't, because VIR_CHRDEV_LOCK_FILE_PATH
is defined as "no", so it tries to create lock files with strange
lock path like 'no/LCK..'.

Fix that by calling AC_DEFINE_UNQUOTED only if $with_chrdev_lock_files
is not 'no'.

configure.ac

index a9339cedc8adc1a0a1ddccfdc7a641fb304be002..62b74c5ed11c56b23579f8d29e7182522acaee62 100644 (file)
@@ -1401,8 +1401,10 @@ if test "$with_chrdev_lock_files" != "no"; then
     AC_MSG_ERROR([You must specify path for the lock files on this
 platform])
   fi
-  AC_DEFINE_UNQUOTED([VIR_CHRDEV_LOCK_FILE_PATH], "$with_chrdev_lock_files",
-                      [path to directory containing UUCP device lock files])
+  if test "$with_chrdev_lock_files" != "no"; then
+    AC_DEFINE_UNQUOTED([VIR_CHRDEV_LOCK_FILE_PATH], "$with_chrdev_lock_files",
+                       [path to directory containing UUCP device lock files])
+  fi
 fi
 AM_CONDITIONAL([VIR_CHRDEV_LOCK_FILE_PATH], [test "$with_chrdev_lock_files" != "no"])