]> jfr.im git - irc/inspircd/inspircd.git/commitdiff
Fix an incompatibility between MySQL and MariaDB.
authorSadie Powell <redacted>
Sun, 18 Dec 2022 18:44:42 +0000 (18:44 +0000)
committerSadie Powell <redacted>
Sun, 18 Dec 2022 18:44:42 +0000 (18:44 +0000)
src/modules/extra/m_mysql.cpp

index c8457f3d511cc7d064a06fdf3359234654689aaa..77f681705a0b7420f5db26615c77db423c8dd99e 100644 (file)
@@ -342,8 +342,10 @@ class SQLConnection : public SQL::Provider
                mysql_options(connection, MYSQL_OPT_CONNECT_TIMEOUT, &timeout);
 
                // Enable SSL if requested.
+#if defined LIBMYSQL_VERSION_ID && LIBMYSQL_VERSION_ID > 80000
                unsigned int ssl = config->getBool("ssl") ? SSL_MODE_REQUIRED : SSL_MODE_PREFERRED;
                mysql_options(connection, MYSQL_OPT_SSL_MODE, &ssl);
+#endif
 
                // Attempt to connect to the database.
                const std::string host = config->getString("host");