Skip to content

Commit 7e26b83

Browse files
committed
Refs #22024: Do not reference OpenSSLInit if security features are no present
Signed-off-by: Mario Dominguez <[email protected]>
1 parent 83a748f commit 7e26b83

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/cpp/rtps/RTPSDomainImpl.hpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,14 @@
3131

3232
#include <rtps/reader/BaseReader.hpp>
3333
#include <rtps/reader/LocalReaderPointer.hpp>
34-
#include <security/OpenSSLInit.hpp>
3534
#include <rtps/writer/BaseWriter.hpp>
3635
#include <utils/shared_memory/BoostAtExitRegistry.hpp>
3736
#include <utils/SystemInfo.hpp>
3837

38+
#if HAVE_SECURITY || TLS_FOUND
39+
#include <security/OpenSSLInit.hpp>
40+
#endif // HAVE_SECURITY || TLS_FOUND
41+
3942
#include <fastdds/xtypes/type_representation/TypeObjectRegistry.hpp>
4043

4144
namespace eprosima {
@@ -286,8 +289,9 @@ class RTPSDomainImpl
286289
std::shared_ptr<eprosima::detail::BoostAtExitRegistry> boost_singleton_handler_ { eprosima::detail::
287290
BoostAtExitRegistry::
288291
get_instance() };
289-
292+
#if HAVE_SECURITY || TLS_FOUND
290293
std::shared_ptr<security::OpenSSLInit> openssl_singleton_handler_{ security::OpenSSLInit::get_instance() };
294+
#endif // HAVE_SECURITY || TLS_FOUND
291295

292296
std::mutex m_mutex;
293297

0 commit comments

Comments
 (0)