From: Kefu Chai Date: Wed, 3 May 2017 04:00:52 +0000 (+0800) Subject: librbd: do not instantiate templates while building tests X-Git-Tag: v12.0.3~95^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F14891%2Fhead;p=ceph.git librbd: do not instantiate templates while building tests to avoid violation of ODR Fixes: http://tracker.ceph.com/issues/18938 Signed-off-by: Kefu Chai --- diff --git a/src/librbd/AsyncObjectThrottle.cc b/src/librbd/AsyncObjectThrottle.cc index 99f0bfda3e7e..1f09091e8f5e 100644 --- a/src/librbd/AsyncObjectThrottle.cc +++ b/src/librbd/AsyncObjectThrottle.cc @@ -100,4 +100,6 @@ void AsyncObjectThrottle::start_next_op() { } // namespace librbd +#ifndef TEST_F template class librbd::AsyncObjectThrottle; +#endif diff --git a/src/librbd/AsyncRequest.cc b/src/librbd/AsyncRequest.cc index e6c25f076a69..a1e4202997d8 100644 --- a/src/librbd/AsyncRequest.cc +++ b/src/librbd/AsyncRequest.cc @@ -66,4 +66,6 @@ void AsyncRequest::finish_request() { } // namespace librbd +#ifndef TEST_F template class librbd::AsyncRequest; +#endif diff --git a/src/librbd/Journal.cc b/src/librbd/Journal.cc index 792437f43be3..c19a6a80c500 100644 --- a/src/librbd/Journal.cc +++ b/src/librbd/Journal.cc @@ -1768,4 +1768,6 @@ void Journal::remove_listener(journal::Listener *listener) { } // namespace librbd +#ifndef TEST_F template class librbd::Journal; +#endif diff --git a/src/librbd/operation/Request.cc b/src/librbd/operation/Request.cc index 7534004edc31..d6201d4cb460 100644 --- a/src/librbd/operation/Request.cc +++ b/src/librbd/operation/Request.cc @@ -178,4 +178,6 @@ void Request::handle_op_event_safe(int r) { } // namespace operation } // namespace librbd +#ifndef TEST_F template class librbd::operation::Request; +#endif