TT#111150 When using MariaDB use its namespaced headers

This makes sure we use headers found in the appropriate
non-compatibility library.

Change-Id: I6e228224c2caef3b0b095666aace49a23d8e6959
mr9.4.1
Guillem Jover 6 years ago
parent 7e3d61ef4d
commit 7a766b7165

@ -10,10 +10,10 @@ GLIB_CFLAGS := $(shell pkg-config glib-2.0 --cflags)
# mariadb/mysql support
ifeq ($(shell pkg-config --exists libmariadb && echo yes),yes)
MYSQL_CFLAGS := $(shell pkg-config --cflags libmariadb)
MYSQL_CFLAGS := $(shell pkg-config --cflags libmariadb) -DMARIADB=1
MYSQL_LDFLAGS := $(shell pkg-config --libs libmariadb)
else ifneq ($(shell which mariadb_config),)
MYSQL_CFLAGS := $(shell mariadb_config --cflags)
MYSQL_CFLAGS := $(shell mariadb_config --cflags) -DMARIADB=1
MYSQL_LDFLAGS := $(shell mariadb_config --libs)
else ifneq ($(shell which mysql_config),)
MYSQL_CFLAGS := $(shell mysql_config --cflags)

@ -1,7 +1,12 @@
#include <stdbool.h>
#include <mysql.h>
#ifdef MARIADB
#include <mariadb/errmsg.h>
#include <mariadb/mysqld_error.h>
#else
#include <mysql/errmsg.h>
#include <mysql/mysqld_error.h>
#endif
#include <assert.h>
#include "medmysql.h"

Loading…
Cancel
Save