summaryrefslogtreecommitdiffstats
path: root/src/blk
diff options
context:
space:
mode:
authorDeepika Upadhyay <dupadhya@redhat.com>2021-08-16 16:04:33 +0200
committerDeepika Upadhyay <dupadhya@redhat.com>2021-08-16 16:04:33 +0200
commitee33b3f19c6859a044bbb1fa73731f3ddb834d32 (patch)
tree63cb7bcb5872156f926e6b3019c7f9d036427e84 /src/blk
parentMerge PR #42318 into master (diff)
downloadceph-ee33b3f19c6859a044bbb1fa73731f3ddb834d32.tar.xz
ceph-ee33b3f19c6859a044bbb1fa73731f3ddb834d32.zip
src/blk: fix block_device_t return if no aio libs present
In cases, when no libaio are present in the system, compilation fails, return block_device_t as unknown fixes: https://tracker.ceph.com/issues/50947#note-1 Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
Diffstat (limited to 'src/blk')
-rw-r--r--src/blk/BlockDevice.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/blk/BlockDevice.cc b/src/blk/BlockDevice.cc
index 25fdc20f036..fd07e443c13 100644
--- a/src/blk/BlockDevice.cc
+++ b/src/blk/BlockDevice.cc
@@ -118,8 +118,11 @@ BlockDevice::detect_device_type(const std::string& path)
return block_device_t::hm_smr;
}
#endif
-
+#if defined(HAVE_LIBAIO) || defined(HAVE_POSIXAIO)
return block_device_t::aio;
+#else
+ return block_device_t::unknown;
+#endif
}
BlockDevice::block_device_t