OSDN Git Service

qemu-pr-helper: Fix build on CentOS 7
authorMurilo Opsfelder Araujo <muriloo@linux.ibm.com>
Fri, 10 Aug 2018 14:11:16 +0000 (11:11 -0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Aug 2018 11:32:50 +0000 (13:32 +0200)
commit1b0578f5c455d5a95384752ef9ffa8825efaf8ee
tree18ac5c68e46bc0ea0ea1d87e870da389088386e0
parent1a5c63ce88e92de163c592505c2e2153476b9345
qemu-pr-helper: Fix build on CentOS 7

After commit b3f1c8c413bc83e4a2cc7a63e4eddf9fe6449052 "qemu-pr-helper: use new
libmultipath API", QEMU started using new libmultipath API, which is not
available on CentOS 7.x.

This fixes that by probing the new libmultipath API in configure.  If it fails,
then try probing the old API.  If it fails, then consider libmultipath not
available.

With this, configure script defines CONFIG_MPATH_NEW_API that is used in
scsi/qemu-pr-helper.c to use the new libmultipath API.

Fixes: b3f1c8c413bc83e4a2cc7a63e4eddf9fe6449052
BugLink: https://bugs.launchpad.net/qemu/+bug/1786343
Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
Message-Id: <20180810141116.24016-1-muriloo@linux.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
configure
scsi/qemu-pr-helper.c