You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
223 lines
6.1 KiB
223 lines
6.1 KiB
Index: client/client_shared.h |
|
--- client/client_shared.h.orig 2019-09-12 18:24:07.000000000 +0200 |
|
+++ client/client_shared.h 2019-09-13 07:42:40.659132000 +0200 |
|
@@ -18,6 +18,7 @@ |
|
#define CLIENT_CONFIG_H |
|
|
|
#include <stdio.h> |
|
+#include <sys/time.h> |
|
|
|
#ifdef WIN32 |
|
# include <winsock2.h> |
|
Index: config.mk |
|
--- config.mk.orig 2019-09-12 18:24:07.000000000 +0200 |
|
+++ config.mk 2019-09-13 07:42:40.659394000 +0200 |
|
@@ -274,20 +274,20 @@ |
|
|
|
ifeq ($(WITH_WEBSOCKETS),yes) |
|
BROKER_CPPFLAGS:=$(BROKER_CPPFLAGS) -DWITH_WEBSOCKETS |
|
- BROKER_LDADD:=$(BROKER_LDADD) -lwebsockets |
|
+ BROKER_LDADD:=$(BROKER_LDADD) -lwebsockets -lssl -lcrypto -lz |
|
endif |
|
|
|
ifeq ($(WITH_WEBSOCKETS),static) |
|
BROKER_CPPFLAGS:=$(BROKER_CPPFLAGS) -DWITH_WEBSOCKETS |
|
- BROKER_LDADD:=$(BROKER_LDADD) -static -lwebsockets |
|
+ BROKER_LDADD:=$(BROKER_LDADD) -static -lwebsockets -lssl -lcrypto -lz |
|
endif |
|
|
|
INSTALL?=install |
|
-prefix?=/usr/local |
|
+prefix?=${PREFIX} |
|
incdir?=${prefix}/include |
|
-libdir?=${prefix}/lib${LIB_SUFFIX} |
|
-localedir?=${prefix}/share/locale |
|
-mandir?=${prefix}/share/man |
|
+libdir?=${prefix}/lib |
|
+localedir?=${PREFIX}/share/locale |
|
+mandir?=${PREFIX}/man |
|
STRIP?=strip |
|
|
|
ifeq ($(WITH_STRIP),yes) |
|
Index: lib/CMakeLists.txt |
|
--- lib/CMakeLists.txt.orig 2019-09-12 18:24:07.000000000 +0200 |
|
+++ lib/CMakeLists.txt 2019-09-13 07:42:40.659627000 +0200 |
|
@@ -74,21 +74,6 @@ |
|
endif (ARES_HEADER) |
|
endif (WITH_SRV) |
|
|
|
-add_library(libmosquitto SHARED ${C_SRC}) |
|
-set_target_properties(libmosquitto PROPERTIES |
|
- POSITION_INDEPENDENT_CODE 1 |
|
-) |
|
- |
|
-target_link_libraries(libmosquitto ${LIBRARIES}) |
|
- |
|
-set_target_properties(libmosquitto PROPERTIES |
|
- OUTPUT_NAME mosquitto |
|
- VERSION ${VERSION} |
|
- SOVERSION 1 |
|
-) |
|
- |
|
-install(TARGETS libmosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") |
|
- |
|
if (WITH_STATIC_LIBRARIES) |
|
add_library(libmosquitto_static STATIC ${C_SRC}) |
|
if (WITH_PIC) |
|
Index: lib/cpp/CMakeLists.txt |
|
--- lib/cpp/CMakeLists.txt.orig 2019-09-12 18:24:07.000000000 +0200 |
|
+++ lib/cpp/CMakeLists.txt 2019-09-13 07:42:40.659836000 +0200 |
|
@@ -4,17 +4,6 @@ |
|
|
|
set(CPP_SRC mosquittopp.cpp mosquittopp.h) |
|
|
|
-add_library(mosquittopp SHARED ${CPP_SRC}) |
|
-set_target_properties(mosquittopp PROPERTIES |
|
- POSITION_INDEPENDENT_CODE 1 |
|
-) |
|
-target_link_libraries(mosquittopp libmosquitto) |
|
-set_target_properties(mosquittopp PROPERTIES |
|
- VERSION ${VERSION} |
|
- SOVERSION 1 |
|
-) |
|
-install(TARGETS mosquittopp RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") |
|
- |
|
if (WITH_STATIC_LIBRARIES) |
|
add_library(mosquittopp_static STATIC |
|
${C_SRC} |
|
Index: lib/mosquitto.c |
|
--- lib/mosquitto.c.orig 2019-09-12 18:24:07.000000000 +0200 |
|
+++ lib/mosquitto.c 2019-09-13 07:42:40.660124000 +0200 |
|
@@ -16,6 +16,10 @@ |
|
|
|
#include "config.h" |
|
|
|
+#if defined(__FreeBSD__) |
|
+#define __XSI_VISIBLE 1 |
|
+#endif |
|
+ |
|
#include <errno.h> |
|
#include <signal.h> |
|
#include <string.h> |
|
Index: lib/tls_mosq.c |
|
--- lib/tls_mosq.c.orig 2019-09-12 18:24:07.000000000 +0200 |
|
+++ lib/tls_mosq.c 2019-09-13 07:42:40.660315000 +0200 |
|
@@ -24,6 +24,7 @@ |
|
#else |
|
# include <arpa/inet.h> |
|
# include <sys/socket.h> |
|
+# include <netinet/in.h> |
|
# include <strings.h> |
|
#endif |
|
|
|
Index: lib/tls_mosq.h |
|
--- lib/tls_mosq.h.orig 2019-09-12 18:24:07.000000000 +0200 |
|
+++ lib/tls_mosq.h 2019-09-13 07:42:40.660457000 +0200 |
|
@@ -27,6 +27,7 @@ |
|
|
|
#include <openssl/ssl.h> |
|
#include <openssl/engine.h> |
|
+#include <sys/socket.h> |
|
|
|
int mosquitto__server_certificate_verify(int preverify_ok, X509_STORE_CTX *ctx); |
|
int mosquitto__verify_certificate_hostname(X509 *cert, const char *hostname); |
|
Index: src/CMakeLists.txt |
|
--- src/CMakeLists.txt.orig 2019-09-12 18:24:07.000000000 +0200 |
|
+++ src/CMakeLists.txt 2019-09-13 07:42:40.660647000 +0200 |
|
@@ -149,7 +149,11 @@ |
|
elseif(QNX) |
|
set(MOSQ_LIBS ${MOSQ_LIBS} m socket) |
|
else(APPLE) |
|
- set (MOSQ_LIBS ${MOSQ_LIBS} dl m) |
|
+ set (MOSQ_LIBS ${MOSQ_LIBS} m) |
|
+ find_library(LIBDL dl) |
|
+ if (LIBDL) |
|
+ set (MOSQ_LIBS ${MOSQ_LIBS} dl) |
|
+ endif (LIBDL) |
|
find_library(LIBRT rt) |
|
if (LIBRT) |
|
set (MOSQ_LIBS ${MOSQ_LIBS} rt) |
|
@@ -163,13 +167,13 @@ |
|
|
|
if (WITH_WEBSOCKETS) |
|
if (STATIC_WEBSOCKETS) |
|
- set (MOSQ_LIBS ${MOSQ_LIBS} websockets_static) |
|
+ set (MOSQ_LIBS ${MOSQ_LIBS} websockets_static ssl crypto z) |
|
if (WIN32) |
|
set (MOSQ_LIBS ${MOSQ_LIBS} iphlpapi) |
|
link_directories(${mosquitto_SOURCE_DIR}) |
|
endif (WIN32) |
|
else (STATIC_WEBSOCKETS) |
|
- set (MOSQ_LIBS ${MOSQ_LIBS} websockets) |
|
+ set (MOSQ_LIBS ${MOSQ_LIBS} websockets ssl crypto z) |
|
endif (STATIC_WEBSOCKETS) |
|
endif (WITH_WEBSOCKETS) |
|
|
|
Index: src/mosquitto.c |
|
--- src/mosquitto.c.orig 2019-09-12 18:24:07.000000000 +0200 |
|
+++ src/mosquitto.c 2019-09-13 07:42:40.660863000 +0200 |
|
@@ -16,6 +16,11 @@ |
|
|
|
#include "config.h" |
|
|
|
+#if defined(__FreeBSD__) |
|
+#define __XSI_VISIBLE 1 |
|
+#define __BSD_VISIBLE 1 |
|
+#endif |
|
+ |
|
#ifndef WIN32 |
|
/* For initgroups() */ |
|
# include <unistd.h> |
|
@@ -32,6 +37,7 @@ |
|
#endif |
|
|
|
#ifndef WIN32 |
|
+# include <time.h> |
|
# include <sys/time.h> |
|
#endif |
|
|
|
@@ -39,6 +45,8 @@ |
|
#include <signal.h> |
|
#include <stdio.h> |
|
#include <string.h> |
|
+#include <sys/types.h> |
|
+#include <sys/socket.h> |
|
#ifdef WITH_SYSTEMD |
|
# include <systemd/sd-daemon.h> |
|
#endif |
|
Index: src/mosquitto_broker_internal.h |
|
--- src/mosquitto_broker_internal.h.orig 2019-09-12 18:24:07.000000000 +0200 |
|
+++ src/mosquitto_broker_internal.h 2019-09-13 07:42:40.661104000 +0200 |
|
@@ -20,6 +20,8 @@ |
|
|
|
#include "config.h" |
|
#include <stdio.h> |
|
+#include <sys/types.h> |
|
+#include <sys/socket.h> |
|
|
|
#ifdef WITH_WEBSOCKETS |
|
# include <libwebsockets.h> |
|
Index: src/signals.c |
|
--- src/signals.c.orig 2019-09-12 18:24:07.000000000 +0200 |
|
+++ src/signals.c 2019-09-13 07:42:40.661262000 +0200 |
|
@@ -39,6 +39,8 @@ |
|
#include <signal.h> |
|
#include <stdio.h> |
|
#include <string.h> |
|
+#include <sys/types.h> |
|
+#include <sys/socket.h> |
|
#ifdef WITH_SYSTEMD |
|
# include <systemd/sd-daemon.h> |
|
#endif |
|
Index: src/websockets.c |
|
--- src/websockets.c.orig 2019-09-12 18:24:07.000000000 +0200 |
|
+++ src/websockets.c 2019-09-13 07:42:40.661480000 +0200 |
|
@@ -31,6 +31,8 @@ |
|
|
|
#include "config.h" |
|
|
|
+#include <sys/types.h> |
|
+#include <sys/socket.h> |
|
#include <libwebsockets.h> |
|
#include "mosquitto_internal.h" |
|
#include "mosquitto_broker_internal.h"
|
|
|