From: Deepika Upadhyay Date: Mon, 16 Aug 2021 14:04:33 +0000 (+0530) Subject: src/blk: fix block_device_t return if no aio libs present X-Git-Tag: v17.1.0~1099^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ee33b3f19c6859a044bbb1fa73731f3ddb834d32;p=ceph.git 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 --- 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