summaryrefslogtreecommitdiff
path: root/sql/udf_example.c
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2018-02-20 21:17:36 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2018-02-20 21:17:36 +0000
commit56e7b7eaede52e8d2123e909d7d42220f8c63143 (patch)
tree73e1dc4b2e53d68c3a9d5269f9140142ef08c187 /sql/udf_example.c
parent9d97e6010ebdeab0579a8371d01f34118c518b30 (diff)
downloadmariadb-git-56e7b7eaede52e8d2123e909d7d42220f8c63143.tar.gz
Make possible to use clang on Windows (clang-cl)
-DWITH_ASAN can be used as well now, on x64 Fix many clang-cl warnings.
Diffstat (limited to 'sql/udf_example.c')
-rw-r--r--sql/udf_example.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sql/udf_example.c b/sql/udf_example.c
index afe3c5592bc..6db2b5e737a 100644
--- a/sql/udf_example.c
+++ b/sql/udf_example.c
@@ -112,6 +112,11 @@
**
*/
+#ifdef _WIN32
+/* Silence warning about deprecated functions , gethostbyname etc*/
+#define _WINSOCK_DEPRECATED_NO_WARNINGS
+#endif
+
#ifdef STANDARD
/* STANDARD is defined, don't use any mysql functions */
#include <stdlib.h>
@@ -139,14 +144,6 @@ typedef long long longlong;
#include <mysql.h>
#include <ctype.h>
-#ifdef _WIN32
-/* inet_aton needs winsock library */
-#pragma comment(lib, "ws2_32")
-#if _MSC_VER
-/* Silence warning about deprecated functions , gethostbyname etc*/
-#pragma warning(disable : 4996)
-#endif
-#endif
#ifdef HAVE_DLOPEN