diff --git a/src/communication/client.hpp b/src/communication/client.hpp index 851c9f003..c0f7cfad8 100644 --- a/src/communication/client.hpp +++ b/src/communication/client.hpp @@ -1,4 +1,4 @@ -// Copyright 2022 Memgraph Ltd. +// Copyright 2023 Memgraph Ltd. // // Use of this software is governed by the Business Source License // included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source @@ -15,6 +15,10 @@ #include #include +// Centos 7 OpenSSL includes libkrb5 which has brings in macros TRUE and FALSE. undef to prevent issues. +#undef TRUE +#undef FALSE + #include "communication/buffer.hpp" #include "communication/context.hpp" #include "communication/init.hpp" diff --git a/src/communication/context.hpp b/src/communication/context.hpp index e99cdacef..da5e1ee8a 100644 --- a/src/communication/context.hpp +++ b/src/communication/context.hpp @@ -1,4 +1,4 @@ -// Copyright 2022 Memgraph Ltd. +// Copyright 2023 Memgraph Ltd. // // Use of this software is governed by the Business Source License // included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source @@ -17,6 +17,10 @@ #include #include +// Centos 7 OpenSSL includes libkrb5 which has brings in macros TRUE and FALSE. undef to prevent issues. +#undef TRUE +#undef FALSE + namespace memgraph::communication { /** diff --git a/src/communication/session.hpp b/src/communication/session.hpp index d61929b51..e44bf9532 100644 --- a/src/communication/session.hpp +++ b/src/communication/session.hpp @@ -22,6 +22,10 @@ #include #include +// Centos 7 OpenSSL includes libkrb5 which has brings in macros TRUE and FALSE. undef to prevent issues. +#undef TRUE +#undef FALSE + #include "communication/buffer.hpp" #include "communication/context.hpp" #include "communication/exceptions.hpp" diff --git a/src/query/db_accessor.hpp b/src/query/db_accessor.hpp index 7d9001593..3a38127c2 100644 --- a/src/query/db_accessor.hpp +++ b/src/query/db_accessor.hpp @@ -22,31 +22,13 @@ #include "storage/v2/id_types.hpp" #include "storage/v2/property_value.hpp" #include "storage/v2/result.hpp" -#include "storage/v2/storage_mode.hpp" -#include "utils/pmr/unordered_set.hpp" -#include "utils/variant_helpers.hpp" - -/////////////////////////////////////////////////////////// -// Our communication layer and query engine don't mix -// very well on Centos because OpenSSL version available -// on Centos 7 include libkrb5 which has brilliant macros -// called TRUE and FALSE. For more detailed explanation go -// to memgraph.cpp. -// -// Because of the replication storage now uses some form of -// communication so we have some unwanted macros. -// This cannot be avoided by simple include orderings so we -// simply undefine those macros as we're sure that libkrb5 -// won't and can't be used anywhere in the query engine. #include "storage/v2/storage.hpp" - -#undef FALSE -#undef TRUE -/////////////////////////////////////////////////////////// - +#include "storage/v2/storage_mode.hpp" #include "storage/v2/view.hpp" #include "utils/bound.hpp" #include "utils/exceptions.hpp" +#include "utils/pmr/unordered_set.hpp" +#include "utils/variant_helpers.hpp" namespace memgraph::query { diff --git a/src/requests/CMakeLists.txt b/src/requests/CMakeLists.txt index a63da920a..f94694f59 100644 --- a/src/requests/CMakeLists.txt +++ b/src/requests/CMakeLists.txt @@ -8,6 +8,6 @@ find_package(gflags REQUIRED) add_library(mg-requests STATIC ${requests_src_files}) target_link_libraries(mg-requests - PUBLIC mg-utils spdlog::spdlog fmt::fmt gflags json ${CURL_LIBRARIES} - PRIVATE lib::ctre) + PUBLIC mg-utils lib::json + PRIVATE lib::ctre spdlog::spdlog ${CURL_LIBRARIES} fmt::fmt gflags) target_include_directories(mg-requests PRIVATE ${CURL_INCLUDE_DIRS}) diff --git a/src/requests/requests.hpp b/src/requests/requests.hpp index fcf8838a3..52d7de840 100644 --- a/src/requests/requests.hpp +++ b/src/requests/requests.hpp @@ -11,11 +11,9 @@ #pragma once -#include -#include +#include #include -#include #include namespace memgraph::requests {