From 73a5a93ff982a2e783828b1e11988614d38d8687 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 26 Dec 2017 22:45:20 -0200 Subject: MySQL: Fix qAddPostRoutine of mysql_server_end() on Windows The function is declared as STDCALL, so we can't add a direct function pointer to it (calling convention doesn't match what QtCore will try to use). Instead, add a lambda as a trampoline. Task-number: QTBUG-65471 Change-Id: I39332e0a867442d58082fffd1504002206e5cfaf Reviewed-by: Andy Shaw --- src/plugins/sqldrivers/mysql/qsql_mysql.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/sqldrivers/mysql') diff --git a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp index 6e428fb878..28d5ccb4a2 100644 --- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp +++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp @@ -1160,7 +1160,7 @@ static void qLibraryInit() #endif // Q_NO_MYSQL_EMBEDDED #ifdef MARIADB_BASE_VERSION - qAddPostRoutine(mysql_server_end); + qAddPostRoutine([]() { mysql_server_end(); }); #endif } -- cgit v1.2.3