summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorRafal Somla <rafal.somla@oracle.com>2011-06-03 13:44:33 +0200
committerRafal Somla <rafal.somla@oracle.com>2011-06-03 13:44:33 +0200
commit8c6d569f2ae4f63dd34ef5c0f90fc3a3f617efbc (patch)
treeb97c783cf89b49dcfeaee573d31c6e8c59e29e51 /libmysql
parent0e5617e5aa52e71a3ac06cf9eaf8ac4e336a14c4 (diff)
downloadmariadb-git-8c6d569f2ae4f63dd34ef5c0f90fc3a3f617efbc.tar.gz
Bug#12612143 - LIBMYSQL 5.5.13 BREAKS USER APPLICATION BUILD
Since the Windows authentication support has been added to libmysql, this library depends on the system Secur32 library. Consequently, clients which are linked against libmysql should be also linked with Secur32 (in addition to ws2_32). In MS VC++ it is possible to embed information about required libraries into object file using #pragma directive. This patch adds such directive when the Windows authentiaction support is compiled. This is similar to analogous #pragma for ws2_32 library in my_init.c
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/authentication_win/plugin_client.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/libmysql/authentication_win/plugin_client.cc b/libmysql/authentication_win/plugin_client.cc
index 72769ada8f6..30dc5b1493d 100644
--- a/libmysql/authentication_win/plugin_client.cc
+++ b/libmysql/authentication_win/plugin_client.cc
@@ -20,6 +20,16 @@
#include "common.h"
+/*
+ The following MS C++ specific pragma embeds a comment in the resulting
+ object file. A "lib" comment tells the linker to use the specified
+ library, thus the dependency is handled automagically.
+*/
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Secur32")
+#endif
+
static int win_auth_client_plugin_init(char*, size_t, int, va_list)
{
return 0;