From 91ba5b69cda3bc24580406b203d77df67362b88d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Wed, 19 May 2021 12:26:40 +0200 Subject: [PATCH] Temporarily added declaration of 'GloMyLdapAuth' to 'setparser_test.cpp' to avoid linker issues #3450 --- test/tap/tests/setparser_test.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/tap/tests/setparser_test.cpp b/test/tap/tests/setparser_test.cpp index 9084b31d2..627d01fa8 100644 --- a/test/tap/tests/setparser_test.cpp +++ b/test/tap/tests/setparser_test.cpp @@ -16,6 +16,24 @@ #include #include +// ******************************************************************************************* +/** + * TODO: This should be fixed once we have improved include hierarchy. All the following + * includes are required to avoid the following linker error related to 'GloMyLdapAuth': + * + * ``` + * /usr/bin/ld: ../../../lib/libproxysql.a(ProxySQL_GloVars.oo): in function `ProxySQL_GlobalVariables::generate_global_checksum()': + * /home/javjarfer/Projects/proxysql_v2.2.0/lib/ProxySQL_GloVars.cpp:374: undefined reference to `GloMyLdapAuth' + * ``` + * + * For now we just declare it locally to avoid the linking error. + */ +#include "openssl/ssl.h" +#include "proxysql_structs.h" +#include "MySQL_LDAP_Authentication.hpp" +MySQL_LDAP_Authentication *GloMyLdapAuth = nullptr; +// ****************************************************************************************** + bool iequals(const std::string& a, const std::string& b) { unsigned int sz = a.size();