aboutsummaryrefslogtreecommitdiff
path: root/odb/mysql/mysql-types.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-11-27 23:59:42 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-11-29 17:11:38 +0300
commit6586a59e63d089f38503656949d7aa8734ca8924 (patch)
tree5733850890635be94a18626b8acc710f89e63b01 /odb/mysql/mysql-types.hxx
parent619d3ff17c0d2c7eb910285792329491f5438268 (diff)
Add support for build2 build
Diffstat (limited to 'odb/mysql/mysql-types.hxx')
-rw-r--r--odb/mysql/mysql-types.hxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/odb/mysql/mysql-types.hxx b/odb/mysql/mysql-types.hxx
index cd92d41..362d618 100644
--- a/odb/mysql/mysql-types.hxx
+++ b/odb/mysql/mysql-types.hxx
@@ -10,10 +10,18 @@
typedef char my_bool;
typedef struct st_mysql_bind MYSQL_BIND;
-#ifdef LIBODB_MYSQL_INCLUDE_SHORT
-# include <mysql_time.h>
+// MariaDB defines time types directly in mysql.h. Note that MariaDB is only
+// supported by the build2 build so we include the header as <mysql/mysql.h>
+// unconditionally.
+//
+#ifdef LIBODB_MYSQL_MARIADB
+# include <mysql/mysql.h>
#else
-# include <mysql/mysql_time.h>
+# ifdef LIBODB_MYSQL_INCLUDE_SHORT
+# include <mysql_time.h>
+# else
+# include <mysql/mysql_time.h>
+# endif
#endif
#endif // ODB_MYSQL_MYSQL_TYPES_HXX