|
@@ -1092,9 +1092,8 @@ endif
|
|
|
|
|
|
mpathlibs = [libudev]
|
|
mpathlibs = [libudev]
|
|
mpathpersist = not_found
|
|
mpathpersist = not_found
|
|
-mpathpersist_new_api = false
|
|
|
|
if targetos == 'linux' and have_tools and get_option('mpath').allowed()
|
|
if targetos == 'linux' and have_tools and get_option('mpath').allowed()
|
|
- mpath_test_source_new = '''
|
|
|
|
|
|
+ mpath_test_source = '''
|
|
#include <libudev.h>
|
|
#include <libudev.h>
|
|
#include <mpath_persist.h>
|
|
#include <mpath_persist.h>
|
|
unsigned mpath_mx_alloc_len = 1024;
|
|
unsigned mpath_mx_alloc_len = 1024;
|
|
@@ -1111,16 +1110,6 @@ if targetos == 'linux' and have_tools and get_option('mpath').allowed()
|
|
multipath_conf = mpath_lib_init();
|
|
multipath_conf = mpath_lib_init();
|
|
return 0;
|
|
return 0;
|
|
}'''
|
|
}'''
|
|
- mpath_test_source_old = '''
|
|
|
|
- #include <libudev.h>
|
|
|
|
- #include <mpath_persist.h>
|
|
|
|
- unsigned mpath_mx_alloc_len = 1024;
|
|
|
|
- int logsink;
|
|
|
|
- int main(void) {
|
|
|
|
- struct udev *udev = udev_new();
|
|
|
|
- mpath_lib_init(udev);
|
|
|
|
- return 0;
|
|
|
|
- }'''
|
|
|
|
libmpathpersist = cc.find_library('mpathpersist',
|
|
libmpathpersist = cc.find_library('mpathpersist',
|
|
required: get_option('mpath'))
|
|
required: get_option('mpath'))
|
|
if libmpathpersist.found()
|
|
if libmpathpersist.found()
|
|
@@ -1139,10 +1128,7 @@ if targetos == 'linux' and have_tools and get_option('mpath').allowed()
|
|
endforeach
|
|
endforeach
|
|
if mpathlibs.length() == 0
|
|
if mpathlibs.length() == 0
|
|
msg = 'Dependencies missing for libmpathpersist'
|
|
msg = 'Dependencies missing for libmpathpersist'
|
|
- elif cc.links(mpath_test_source_new, dependencies: mpathlibs)
|
|
|
|
- mpathpersist = declare_dependency(dependencies: mpathlibs)
|
|
|
|
- mpathpersist_new_api = true
|
|
|
|
- elif cc.links(mpath_test_source_old, dependencies: mpathlibs)
|
|
|
|
|
|
+ elif cc.links(mpath_test_source, dependencies: mpathlibs)
|
|
mpathpersist = declare_dependency(dependencies: mpathlibs)
|
|
mpathpersist = declare_dependency(dependencies: mpathlibs)
|
|
else
|
|
else
|
|
msg = 'Cannot detect libmpathpersist API'
|
|
msg = 'Cannot detect libmpathpersist API'
|
|
@@ -2094,7 +2080,6 @@ config_host_data.set('CONFIG_GCOV', get_option('b_coverage'))
|
|
config_host_data.set('CONFIG_LIBUDEV', libudev.found())
|
|
config_host_data.set('CONFIG_LIBUDEV', libudev.found())
|
|
config_host_data.set('CONFIG_LZO', lzo.found())
|
|
config_host_data.set('CONFIG_LZO', lzo.found())
|
|
config_host_data.set('CONFIG_MPATH', mpathpersist.found())
|
|
config_host_data.set('CONFIG_MPATH', mpathpersist.found())
|
|
-config_host_data.set('CONFIG_MPATH_NEW_API', mpathpersist_new_api)
|
|
|
|
config_host_data.set('CONFIG_BLKIO', blkio.found())
|
|
config_host_data.set('CONFIG_BLKIO', blkio.found())
|
|
if blkio.found()
|
|
if blkio.found()
|
|
config_host_data.set('CONFIG_BLKIO_VHOST_VDPA_FD',
|
|
config_host_data.set('CONFIG_BLKIO_VHOST_VDPA_FD',
|