# HG changeset patch # User Michiel Broek # Date 1574505273 -3600 # Node ID 57cb71496a9ae377f5b86be3e6d87e2209c108f9 # Parent f34e480ec6c540c63fcb584f2b1cc8ecec450748 Compile fix for Debian Buster. diff -r f34e480ec6c5 -r 57cb71496a9a bmsd/bms.h --- a/bmsd/bms.h Sun Nov 10 16:48:19 2019 +0100 +++ b/bmsd/bms.h Sat Nov 23 11:34:33 2019 +0100 @@ -45,7 +45,12 @@ #include #include #include +#ifdef HAVE_MYSQL_MYSQL_H #include +#endif +#ifdef HAVE_MARIADB_MYSQL_H +#include +#endif #include diff -r f34e480ec6c5 -r 57cb71496a9a config.h.in --- a/config.h.in Sun Nov 10 16:48:19 2019 +0100 +++ b/config.h.in Sat Nov 23 11:34:33 2019 +0100 @@ -9,3 +9,9 @@ /* According to Sun we MUST define this in the source */ #define _REENTRANT 1 +/* Define if you have the header file. */ +#undef HAVE_MYSQL_MYSQL_H + +/* Define if you have the header file. */ +#undef HAVE_MARIADB_MYSQL_H + diff -r f34e480ec6c5 -r 57cb71496a9a config.status --- a/config.status Sun Nov 10 16:48:19 2019 +0100 +++ b/config.status Sat Nov 23 11:34:33 2019 +0100 @@ -724,7 +724,7 @@ D["HAVE_UNISTD_H"]=" 1" D["HAVE_MOSQUITTO_H"]=" 1" D["HAVE_JSON_C_JSON_H"]=" 1" -D["HAVE_MYSQL_MYSQL_H"]=" 1" +D["HAVE_MARIADB_MYSQL_H"]=" 1" D["HAVE_LIBXML_XMLMEMORY_H"]=" 1" D["HAVE_UUID_UUID_H"]=" 1" D["STDC_HEADERS"]=" 1" diff -r f34e480ec6c5 -r 57cb71496a9a configure --- a/configure Sun Nov 10 16:48:19 2019 +0100 +++ b/configure Sat Nov 23 11:34:33 2019 +0100 @@ -3652,6 +3652,18 @@ done + for ac_header in mariadb/mysql.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "mariadb/mysql.h" "ac_cv_header_mariadb_mysql_h" "$ac_includes_default" +if test "x$ac_cv_header_mariadb_mysql_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MARIADB_MYSQL_H 1 +_ACEOF + +fi + +done + else as_fn_error $? "mysqlclient not found" "$LINENO" 5 fi diff -r f34e480ec6c5 -r 57cb71496a9a configure.ac --- a/configure.ac Sun Nov 10 16:48:19 2019 +0100 +++ b/configure.ac Sat Nov 23 11:34:33 2019 +0100 @@ -66,6 +66,7 @@ if test "$result" = "yes"; then LIBS="$LIBS -lmysqlclient" AC_CHECK_HEADERS(mysql/mysql.h) + AC_CHECK_HEADERS(mariadb/mysql.h) else AC_MSG_ERROR(mysqlclient not found) fi