From a7df0d3b3c0ddcb5630cd53ac72fd9e999963ff2 Mon Sep 17 00:00:00 2001 From: Rahim Kanji Date: Thu, 18 Sep 2025 11:26:23 +0500 Subject: [PATCH] Fixed clang compilation --- include/Base_Session.h | 2 -- include/MySQL_Session.h | 6 ++++++ include/PgSQL_Session.h | 5 +++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/Base_Session.h b/include/Base_Session.h index 7cbf91703..88199e215 100644 --- a/include/Base_Session.h +++ b/include/Base_Session.h @@ -1,5 +1,3 @@ -template class Base_Session; - //// avoid loading definition of MySQL_Session and PgSQL_Session //#define __CLASS_MYSQL_SESSION_H //#define __CLASS_PGSQL_SESSION_H diff --git a/include/MySQL_Session.h b/include/MySQL_Session.h index 9f6638575..42d69da9a 100644 --- a/include/MySQL_Session.h +++ b/include/MySQL_Session.h @@ -445,7 +445,13 @@ class MySQL_Session: public Base_Session + friend class Base_Session; +#else friend class Base_Session; +#endif }; #define KILL_QUERY 1 diff --git a/include/PgSQL_Session.h b/include/PgSQL_Session.h index d2ca616ea..2f41ff4d5 100644 --- a/include/PgSQL_Session.h +++ b/include/PgSQL_Session.h @@ -590,7 +590,12 @@ public: void generate_status_one_hostgroup(int hid, std::string& s); void set_previous_status_mode3(bool allow_execute = true); +#if defined(__clang__) + template + friend class Base_Session; +#else friend class Base_Session; +#endif };