From a45270a441d483ce57db48cda699a0d2d9c01f18 Mon Sep 17 00:00:00 2001 From: Boris Ranto Date: Thu, 28 Feb 2019 00:58:12 +0100 Subject: [PATCH] s390x: A compile hack Signed-off-by: Boris Ranto --- src/rgw/rgw_dmclock_async_scheduler.cc | 2 ++ src/test/rgw/test_rgw_dmclock_scheduler.cc | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/rgw/rgw_dmclock_async_scheduler.cc b/src/rgw/rgw_dmclock_async_scheduler.cc index 18ba5a5e32..08657cf2b5 100644 --- a/src/rgw/rgw_dmclock_async_scheduler.cc +++ b/src/rgw/rgw_dmclock_async_scheduler.cc @@ -41,6 +41,7 @@ int AsyncScheduler::schedule_request_impl(const client_id& client, const Time& time, const Cost& cost, optional_yield yield_ctx) { +#ifdef HAVE_BOOST_CONTEXT ceph_assert(yield_ctx); auto &yield = yield_ctx.get_yield_context(); @@ -53,6 +54,7 @@ int AsyncScheduler::schedule_request_impl(const client_id& client, else return -ec.value(); } +#endif return 0; } diff --git a/src/test/rgw/test_rgw_dmclock_scheduler.cc b/src/test/rgw/test_rgw_dmclock_scheduler.cc index 4e4177cb0b..ddbfd12217 100644 --- a/src/test/rgw/test_rgw_dmclock_scheduler.cc +++ b/src/test/rgw/test_rgw_dmclock_scheduler.cc @@ -14,6 +14,8 @@ //#define BOOST_ASIO_ENABLE_HANDLER_TRACKING +#ifdef HAVE_BOOST_CONTEXT + #include "rgw/rgw_dmclock_sync_scheduler.h" #include "rgw/rgw_dmclock_async_scheduler.h" @@ -395,8 +397,6 @@ TEST(Queue, CrossExecutorRequest) EXPECT_EQ(PhaseType::priority, *p2); } -#ifdef HAVE_BOOST_CONTEXT - TEST(Queue, SpawnAsyncRequest) { boost::asio::io_context context; @@ -426,6 +426,6 @@ TEST(Queue, SpawnAsyncRequest) EXPECT_TRUE(context.stopped()); } -#endif - } // namespace rgw::dmclock + +#endif -- 2.20.1