mirror of
https://github.com/MariaDB/server.git
synced 2026-04-20 07:15:33 +02:00
Fix compile error on Windows after WL#1054 push.
The error was introduced by typo in variable name (errormsg instead of correct errmsg) - Also, precache HAVE_PEERCRED to OFF in cmake\os\WindowsCache.cmake (to avoid useless system check). - Also, add missing check for errors from FormatMessage(). - Also, remove annoying CMake debug printout of MALLOC_LIB if this is not set.
This commit is contained in:
parent
57bb4dee2e
commit
a1fe23668f
3 changed files with 8 additions and 7 deletions
|
|
@ -322,7 +322,7 @@ mysql_load_plugin_v(MYSQL *mysql, const char *name, int type,
|
|||
char dlpath[FN_REFLEN+1];
|
||||
void *sym, *dlhandle;
|
||||
struct st_mysql_client_plugin *plugin;
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
char win_errormsg[2048];
|
||||
#endif
|
||||
|
||||
|
|
@ -364,10 +364,12 @@ mysql_load_plugin_v(MYSQL *mysql, const char *name, int type,
|
|||
#endif
|
||||
|
||||
DBUG_PRINT ("info", ("failed to dlopen"));
|
||||
#ifdef WIN32
|
||||
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
0, GetLastError(), 0, win_errormsg, 2048, NULL);
|
||||
errormsg= win_errormsg;
|
||||
#ifdef _WIN32
|
||||
if(FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
0, GetLastError(), 0, win_errormsg, 2048, NULL))
|
||||
errmsg= win_errormsg;
|
||||
else
|
||||
errmsg= "";
|
||||
#else
|
||||
errmsg= dlerror();
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue