From 5120789f8842b102554d5ca40ec74fb60dac4189 Mon Sep 17 00:00:00 2001 From: Duncan Bellamy Date: Sat, 27 Aug 2022 10:28:35 +0100 Subject: [PATCH] rgw: rgw_d3n_datacache.cc add check for musl aio_init is glibc specific Fixes: https://tracker.ceph.com/issues/54414 Signed-off-by: Duncan Bellamy --- src/rgw/rgw_d3n_datacache.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_d3n_datacache.cc b/src/rgw/rgw_d3n_datacache.cc index 472d2d57d59..ed375e2ac94 100644 --- a/src/rgw/rgw_d3n_datacache.cc +++ b/src/rgw/rgw_d3n_datacache.cc @@ -9,6 +9,9 @@ #include "rgw_auth_s3.h" #include "rgw_op.h" #include "rgw_crypt_sanitize.h" +#if defined(__linux__) +#include +#endif #if __has_include() #include @@ -97,7 +100,7 @@ void D3nDataCache::init(CephContext *_cct) { if (conf_eviction_policy == "random") eviction_policy = _eviction_policy::RANDOM; -#if defined(HAVE_LIBAIO) +#if defined(HAVE_LIBAIO) && defined(__GLIBC__) // libaio setup struct aioinit ainit{0}; ainit.aio_threads = cct->_conf.get_val("rgw_d3n_libaio_aio_threads"); -- 2.39.5