diff --git a/libs/libblade/Makefile.am b/libs/libblade/Makefile.am index 5c5b39e6e5..cd9e2e8976 100644 --- a/libs/libblade/Makefile.am +++ b/libs/libblade/Makefile.am @@ -26,9 +26,9 @@ libblade_la_SOURCES += src/blade_identity.c src/blade_rpc.c src/blade_connection libblade_la_SOURCES += src/blade_protocol.c src/blade_subscription.c src/blade_channel.c libblade_la_SOURCES += src/blade_transport.c src/blade_transport_wss.c -libblade_la_CFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) +libblade_la_CFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) $(PCRE_CFLAGS) libblade_la_LDFLAGS = -version-info 0:1:0 -lncurses -lpthread -lm -lconfig -lcivetweb $(AM_LDFLAGS) -libblade_la_LIBADD = libunqlite.la +libblade_la_LIBADD = libunqlite.la $(PCRE_LIBS) library_includedir = $(prefix)/include library_include_HEADERS = src/include/blade.h src/include/blade_types.h src/include/blade_stack.h @@ -45,11 +45,11 @@ $(CIVETWEB_LIB): $(CIVETWEB_DIR) cd $(CIVETWEB_DIR) && $(MAKE) lib USE_STACK_SIZE=102400 MAX_REQUEST_SIZE=16384 WITH_LUA=1 LUA_COMPAT_ALL=1 USE_LUA_SQLITE3=1 USE_LUA_FILE_SYSTEM=1 WITH_IPV6=1 WITH_WEBSOCKET=1 && $(MAKE) lib USE_STACK_SIZE=102400 MAX_REQUEST_SIZE=16384 WITH_LUA=1 LUA_COMPAT_ALL=1 USE_LUA_SQLITE3=1 USE_LUA_FILE_SYSTEM=1 WITH_IPV6=1 WITH_WEBSOCKET=1 WITH_DUKTAPE=1 $(CIVETWEB_DIR): - $(GETLIB) $(CIVETWEB).tar.gz + $(GETLIB) $(CIVETWEB).tar.gz $(LIBKS): cd $(top_srcdir)/../libks && /bin/sh ./bootstrap.sh && /bin/sh ./configure && $(MAKE) - + tests: libblade.la $(MAKE) -C test tests diff --git a/libs/libblade/configure.ac b/libs/libblade/configure.ac index c19b7e7f98..3089dc534c 100644 --- a/libs/libblade/configure.ac +++ b/libs/libblade/configure.ac @@ -251,6 +251,7 @@ fi PKG_CHECK_MODULES([SODIUM], [libsodium >= 1.0.0],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([libsodium is required])]) PKG_CHECK_MODULES([LIBKS], [libks >= 0.1],[AC_MSG_RESULT([yes])],[AC_MSG_WARN([libks is required, but not found.])]) +PKG_CHECK_MODULES([PCRE], [libpcre >= 7.8]) # Enable clang address sanitizer bit build AC_ARG_ENABLE(address_sanitizer, diff --git a/libs/libblade/src/blade_restmgr.c b/libs/libblade/src/blade_restmgr.c index 38e9a302e0..f6d3df0905 100644 --- a/libs/libblade/src/blade_restmgr.c +++ b/libs/libblade/src/blade_restmgr.c @@ -293,7 +293,7 @@ KS_DECLARE(ks_status_t) blade_restmgr_data_set(blade_restmgr_t *brestmgr, void * int blade_restmgr_handle_begin_request(struct mg_connection *conn) { - struct mg_request_info *info = mg_get_request_info(conn); + const struct mg_request_info *info = mg_get_request_info(conn); ks_log(KS_LOG_DEBUG, "Request for: %s on %s\n", info->request_uri, info->request_method); diff --git a/libs/libblade/src/include/blade.h b/libs/libblade/src/include/blade.h index 27e69d8f7f..2a4b7f06a1 100644 --- a/libs/libblade/src/include/blade.h +++ b/libs/libblade/src/include/blade.h @@ -38,6 +38,7 @@ #include #include #include +#include #include "unqlite.h" #include "blade_types.h" #include "blade_stack.h"