peteryj / rpms / ceph

Forked from rpms/ceph 4 years ago
Clone

Blame SOURCES/0003-librbd-Conditionally-import-TrimRequest.cc.patch

f81482
From 74a754690736f6608b0d4d9c807df0bd777a129d Mon Sep 17 00:00:00 2001
f81482
From: Boris Ranto <branto@redhat.com>
f81482
Date: Fri, 8 Dec 2017 00:21:38 +0100
f81482
Subject: [PATCH] librbd: Conditionally import TrimRequest.cc
f81482
f81482
We include TrimRequest.cc in librbd tests at two places:
f81482
 - operation/test_mock_TrimRequest.cc
f81482
 - operation/test_mock_ResizeRequest.cc
f81482
f81482
That causes linking errors when doing the builds because some of the
f81482
structures are defined twice.
f81482
f81482
Signed-off-by: Boris Ranto <branto@redhat.com>
f81482
---
f81482
 src/librbd/operation/TrimRequest.cc | 2 ++
f81482
 1 file changed, 2 insertions(+)
f81482
f81482
diff --git a/src/librbd/operation/TrimRequest.cc b/src/librbd/operation/TrimRequest.cc
f81482
index 28f2deb..929ca51 100644
f81482
--- a/src/librbd/operation/TrimRequest.cc
f81482
+++ b/src/librbd/operation/TrimRequest.cc
f81482
@@ -362,4 +362,6 @@ void TrimRequest::send_finish(int r) {
f81482
 } // namespace operation
f81482
 } // namespace librbd
f81482
 
f81482
+#ifndef TEST_F
f81482
 template class librbd::operation::TrimRequest<librbd::ImageCtx>;
f81482
+#endif
f81482
-- 
f81482
2.9.5
f81482