summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile11
-rw-r--r--lib/db.c8
2 files changed, 11 insertions, 8 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 07c3e36..9d23cdc 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -25,7 +25,7 @@ endif
CFLAGS += $(shell pkg-config --cflags uuid)
CFLAGS += $(shell pkg-config --cflags zlib)
-BASELIBS = -lrt
+BASELIBS += -lrt
BASELIBS += $(shell mysql_config --libs_r)
BASELIBS += $(shell pkg-config --libs uuid)
BASELIBS += $(shell pkg-config --libs zlib)
@@ -36,11 +36,10 @@ ifdef USECURL
endif
ifdef USEEPGS
- LIBOBJS += searchtimer.o
+ LIBOBJS += searchtimer.o
endif
ifdef USEPYTHON
- BASELIBS += $(shell python-config --libs)
LIBOBJS += python.o
endif
@@ -50,16 +49,12 @@ endif
ifdef SYSD_NOTIFY
BASELIBS += $(shell pkg-config --libs libsystemd-daemon)
- CFLAGS += $(shell pkg-config --cflags libsystemd-daemon)
+ CFLAGS += $(shell pkg-config --cflags libsystemd-daemon)
endif
CFLAGS += $(shell mysql_config --include)
DEFINES += $(USES)
-ifdef USEPYTHON
- CFLAGS += $(shell python-config --includes)
-endif
-
all: lib $(TEST) $(DEMO)
lib: $(LIBTARGET).a
diff --git a/lib/db.c b/lib/db.c
index 2554cd8..84f4267 100644
--- a/lib/db.c
+++ b/lib/db.c
@@ -1379,11 +1379,19 @@ int cDbConnection::errorSql(cDbConnection* connection, const char* prefix,
if (error == CR_SERVER_LOST ||
error == CR_SERVER_GONE_ERROR ||
+// for compatibility with newer versions of MariaDB library
+#ifdef CR_INVALID_CONN_HANDLE
error == CR_INVALID_CONN_HANDLE ||
+#endif
error == CR_COMMANDS_OUT_OF_SYNC ||
error == CR_SERVER_LOST_EXTENDED ||
error == CR_STMT_CLOSED ||
+// for compatibility with newer versions of MariaDB library
+#ifdef CR_CONN_UNKNOW_PROTOCOL
error == CR_CONN_UNKNOW_PROTOCOL ||
+#else
+ error == CR_CONN_UNKNOWN_PROTOCOL ||
+#endif
error == CR_UNSUPPORTED_PARAM_TYPE ||
error == CR_NO_PREPARE_STMT ||
error == CR_SERVER_HANDSHAKE_ERR ||