peteryj / rpms / ceph

Forked from rpms/ceph 4 years ago
Clone

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

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