summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2020-06-09 19:12:17 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2020-06-09 19:12:17 +0200
commit4af6faf23308d37d1258a015ec5ad5095fc96eea (patch)
treeda3811d7f6078ac7bd23380fc0e30a93d5c1c9fb
parent8f4466f197b7dcaa49150a01022e02fc855398ba (diff)
Make --with-debug work again, and fix deprecated libwebsockets call.
-rw-r--r--configure.ac2
-rw-r--r--src/muniacli.cc16
2 files changed, 13 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 0d4f9e1..656d8cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@ AC_ARG_WITH(debug,
if test x$with_debug == xyes; then
AC_MSG_WARN([*** Building with debug support!])
AC_DEFINE_UNQUOTED(WITH_DEBUG, , [The project is configured to use debug output])
- CXXFLAGS="$CXXFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector -Wall -Werror -g -O0"
+ CXXFLAGS="$CXXFLAGS -fstack-protector -Wall -Werror -g -O0"
fi
dnl ======================
diff --git a/src/muniacli.cc b/src/muniacli.cc
index d6dcc9d..34cb820 100644
--- a/src/muniacli.cc
+++ b/src/muniacli.cc
@@ -135,10 +135,18 @@ int client(const char *address, int port)
if(wsi_node == nullptr)
{
- wsi_node = lws_client_connect(context, address, port,
- 0, "/", address, address,
- "lws-node-protocol",
- ietf_version);
+ lws_client_connect_info info;
+ memset(&info, 0, sizeof(info));
+ info.context = context;
+ info.address = address;
+ info.port = port;
+ info.ssl_connection = 0;
+ info.path = "/";
+ info.host = address;
+ info.origin = address;
+ info.protocol = "lws-node-protocol";
+ info.ietf_version_or_minus_one = ietf_version;
+ wsi_node = lws_client_connect_via_info(&info);
if(wsi_node == nullptr)
{