From f9f2f181455d84b057c7e7114f94e59f0ca133c9 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Thu, 22 Jun 2017 17:51:27 +0300 Subject: [PATCH 1/4] dht: fix bad to_sstring() call to_sstring() is part of seastar, nor the global namespace. --- dht/murmur3_partitioner.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dht/murmur3_partitioner.cc b/dht/murmur3_partitioner.cc index 20faaa09dc..ca4a0a7803 100644 --- a/dht/murmur3_partitioner.cc +++ b/dht/murmur3_partitioner.cc @@ -130,7 +130,7 @@ murmur3_partitioner::bias(uint64_t n) const { } sstring murmur3_partitioner::to_sstring(const token& t) const { - return ::to_sstring(long_token(t)); + return seastar::to_sstring(long_token(t)); } dht::token murmur3_partitioner::from_sstring(const sstring& t) const { From 672de608bf4c21c36b60d3cde7023bb87332bc42 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Thu, 22 Jun 2017 18:15:38 +0300 Subject: [PATCH 2/4] tests: fix call to seastar::sleep() It's not in the global namespace. --- tests/perf/perf_fast_forward.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/perf/perf_fast_forward.cc b/tests/perf/perf_fast_forward.cc index c0941b4dcc..b49c9113ff 100644 --- a/tests/perf/perf_fast_forward.cc +++ b/tests/perf/perf_fast_forward.cc @@ -556,7 +556,7 @@ int main(int argc, char** argv) { std::cout << "Config: rows: " << cfg.n_rows << ", value size: " << cfg.value_size << "\n"; - ::sleep(1s).get(); // wait for system table flushes to quiesce + sleep(1s).get(); // wait for system table flushes to quiesce bool cancel = false; engine().at_exit([&] { From c423330917e7a4fd214e96fd7137333909f3b20d Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Thu, 22 Jun 2017 17:52:33 +0300 Subject: [PATCH 3/4] seastarx: add missing make_shared forward declaration Without this, clang (correctly) complains that it can't deduce the type when it is not explicitly mentioned. --- seastarx.hh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/seastarx.hh b/seastarx.hh index be002be49a..8c424816bd 100644 --- a/seastarx.hh +++ b/seastarx.hh @@ -28,6 +28,9 @@ namespace seastar { template class shared_ptr; +template +shared_ptr make_shared(T&&); + template shared_ptr make_shared(A&&... a); From f3366d8ae62e01b48525d6544734241e23d8b01d Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Thu, 22 Jun 2017 17:53:36 +0300 Subject: [PATCH 4/4] seastarx: don't make seastar namespace inline It's apparently not legal to re-declare an existing namespace inline. Use "using" instead. --- stdx.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stdx.hh b/stdx.hh index a579a7977f..d2d78e4a60 100644 --- a/stdx.hh +++ b/stdx.hh @@ -23,4 +23,5 @@ #pragma once namespace std { namespace experimental {} } -inline namespace seastar { namespace stdx = std::experimental; } +namespace seastar { namespace stdx = std::experimental; } +using namespace seastar;