libmosquitto: add threading support (#7435)

* libmosquitto: enable threading and fix pthread_cancel support
This commit is contained in:
Aditya Alok 2021-09-01 22:01:30 +05:30 committed by GitHub
parent 2e0eea35df
commit f3ffac671d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 3 deletions

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="MQTT library"
TERMUX_PKG_LICENSE="EPL-1.0"
TERMUX_PKG_MAINTAINER="Nathaniel Wesley Filardo @nwf"
TERMUX_PKG_VERSION=2.0.11
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://mosquitto.org/files/source/mosquitto-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=7b36a7198bce85cf31b132f5c6ee36dcf5dadf86fb768501eb1e11ce95d4f78a
TERMUX_PKG_DEPENDS="c-ares, libc++, libcap, libwebsockets, openssl"
@ -11,7 +11,9 @@ TERMUX_PKG_BREAKS="libmosquitto-dev"
TERMUX_PKG_REPLACES="libmosquitto-dev"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DWITH_BUNDLED_DEPS=ON
-DWITH_THREADING=OFF
-DWITH_THREADING=ON
-DWITH_TLS_PSK=OFF
-DWITH_WEBSOCKETS=ON"
-DWITH_WEBSOCKETS=ON
-DWITH_SRV=ON
"
TERMUX_PKG_SERVICE_SCRIPT=("mosquitto" 'exec mosquitto 2>&1')

View File

@ -0,0 +1,11 @@
--- mosquitto-2.0.11/config.h 2021-06-09 18:06:55.000000000 +0530
+++ mosquitto-2.0.11-patch/config.h 2021-08-30 23:54:41.977999900 +0530
@@ -78,7 +78,7 @@
#define UNUSED(A) (void)(A)
/* Android Bionic libpthread implementation doesn't have pthread_cancel */
-#ifndef ANDROID
+#ifndef __ANDROID__
# define HAVE_PTHREAD_CANCEL
#endif