From e6faf2d02c5150afa1653e6232678b23b68fe534 Mon Sep 17 00:00:00 2001
From: thegeorg <thegeorg@yandex-team.com>
Date: Tue, 18 Jul 2023 14:04:56 +0300
Subject: Allow using ibdrv interface in opensource apps

---
 library/cpp/netliba/v6/ib_low.cpp | 2 +-
 library/cpp/netliba/v6/ib_low.h   | 4 ++--
 library/cpp/netliba/v6/ya.make    | 6 +-----
 3 files changed, 4 insertions(+), 8 deletions(-)

(limited to 'library/cpp/netliba/v6')

diff --git a/library/cpp/netliba/v6/ib_low.cpp b/library/cpp/netliba/v6/ib_low.cpp
index 455a5f3512..4dff3ac5cd 100644
--- a/library/cpp/netliba/v6/ib_low.cpp
+++ b/library/cpp/netliba/v6/ib_low.cpp
@@ -8,7 +8,7 @@ namespace NNetliba {
         EnableROCEFlag = f;
     }
 
-#if defined _linux_ && !defined CATBOOST_OPENSOURCE
+#if defined(_linux_)
     static TMutex IBPortMutex;
     static TIntrusivePtr<TIBPort> IBPort;
     static bool IBWasInitialized;
diff --git a/library/cpp/netliba/v6/ib_low.h b/library/cpp/netliba/v6/ib_low.h
index 04f4a08d3c..e3afd9df2e 100644
--- a/library/cpp/netliba/v6/ib_low.h
+++ b/library/cpp/netliba/v6/ib_low.h
@@ -2,7 +2,7 @@
 
 #include "udp_address.h"
 
-#if defined(_linux_) && !defined(CATBOOST_OPENSOURCE)
+#if defined(_linux_)
 #include <contrib/libs/ibdrv/include/infiniband/verbs.h>
 #include <contrib/libs/ibdrv/include/rdma/rdma_cma.h>
 #endif
@@ -22,7 +22,7 @@ namespace NNetliba {
     const size_t MAX_INLINE_DATA_SIZE = 16;
     const int MAX_OUTSTANDING_RDMA = 10;
 
-#if defined(_linux_) && !defined(CATBOOST_OPENSOURCE)
+#if defined(_linux_)
     class TIBContext: public TThrRefBase, TNonCopyable {
         ibv_context* Context;
         ibv_pd* ProtDomain;
diff --git a/library/cpp/netliba/v6/ya.make b/library/cpp/netliba/v6/ya.make
index bb9982356c..9ec600263a 100644
--- a/library/cpp/netliba/v6/ya.make
+++ b/library/cpp/netliba/v6/ya.make
@@ -23,16 +23,12 @@ SRCS(
     ib_memstream.cpp
 )
 
-IF (OS_LINUX AND NOT CATBOOST_OPENSOURCE)
+IF (OS_LINUX)
     PEERDIR(
         contrib/libs/ibdrv
     )
 ENDIF()
 
-IF (CATBOOST_OPENSOURCE)
-    CFLAGS(-DCATBOOST_OPENSOURCE=yes)
-ENDIF()
-
 PEERDIR(
     library/cpp/binsaver
     library/cpp/netliba/socket
-- 
cgit v1.2.3