ceph/0003-librbd-Conditionally-import-TrimRequest.cc.patch

32 lines
988 B
Diff
Raw Normal View History

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