diff options
Diffstat (limited to 'odb/mysql/mysql-types.hxx')
-rw-r--r-- | odb/mysql/mysql-types.hxx | 14 |
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 |