aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-02-12 18:22:14 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-02-12 18:22:14 +0200
commit2922f0c7796fdf4ea1fe21eb2f55d9ad18fd1824 (patch)
tree37b33f9f5f42b275f4b312d7867d445032ce0f1a
parentc5bbd6a853c09dbb02db204e2db9d46647f85850 (diff)
Avoid defining min/max macros when including <winsock2.h>
-rw-r--r--odb/mysql/mysql.hxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/odb/mysql/mysql.hxx b/odb/mysql/mysql.hxx
index 1773433..f4286b9 100644
--- a/odb/mysql/mysql.hxx
+++ b/odb/mysql/mysql.hxx
@@ -10,7 +10,13 @@
#include <odb/mysql/mysql-types.hxx>
#ifdef _WIN32
-# include <winsock2.h>
+# ifndef NOMINMAX // No min and max macros.
+# define NOMINMAX
+# include <winsock2.h>
+# undef NOMINMAX
+# else
+# include <winsock2.h>
+# endif
#endif
#ifdef LIBODB_MYSQL_INCLUDE_SHORT