diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-03 16:21:31 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-03 16:21:31 +0200 |
commit | 7e8e8aba7cc49bd26393c8f2cb07d99df9fec8dd (patch) | |
tree | cbbef7278026edf6ee1d9d93c9ef3df2e50bd001 /odb/mysql/connection-factory.cxx | |
parent | ab9911fc1ed97bcfcb013c202c610a950609f979 (diff) |
Add support for MinGW build
Diffstat (limited to 'odb/mysql/connection-factory.cxx')
-rw-r--r-- | odb/mysql/connection-factory.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/odb/mysql/connection-factory.cxx b/odb/mysql/connection-factory.cxx index c490048..2bfd566 100644 --- a/odb/mysql/connection-factory.cxx +++ b/odb/mysql/connection-factory.cxx @@ -5,10 +5,11 @@ #include <odb/mysql/details/config.hxx> +#ifdef _WIN32 +# include <winsock2.h> +#endif + #ifdef LIBODB_MYSQL_INCLUDE_SHORT -# ifdef _WIN32 -# include <winsock2.h> -# endif # include <mysql.h> # include <errmsg.h> // CR_UNKNOWN_ERROR #else @@ -38,7 +39,7 @@ namespace odb #ifndef ODB_THREADS_NONE mysql_init () { - if (my_thread_init ()) + if (mysql_thread_init ()) { throw database_exception ( CR_UNKNOWN_ERROR, "?????", "thread initialization failed"); @@ -47,7 +48,7 @@ namespace odb ~mysql_init () { - my_thread_end (); + mysql_thread_end (); } #endif }; |