From ee33b3f19c6859a044bbb1fa73731f3ddb834d32 Mon Sep 17 00:00:00 2001 From: Deepika Upadhyay Date: Mon, 16 Aug 2021 19:34:33 +0530 Subject: [PATCH] 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 --- src/blk/BlockDevice.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/blk/BlockDevice.cc b/src/blk/BlockDevice.cc index 25fdc20f036e1..fd07e443c1365 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 -- 2.39.5