From baccf589af7fc1e48e7cfaf24aa0a3ef52a6fc46 Mon Sep 17 00:00:00 2001 From: "Igor Zalatov (from Citadel PC)" Date: Tue, 10 Aug 2021 11:45:37 +0300 Subject: [PATCH] Size fresh and add libevent patch --- .../libevent-openipc/libevent-mbedtls.patch | 16 ++++++++++++++++ .../package/libevent-openipc/libevent-openipc.mk | 8 ++++++++ 2 files changed, 24 insertions(+) create mode 100644 general/package/libevent-openipc/libevent-mbedtls.patch diff --git a/general/package/libevent-openipc/libevent-mbedtls.patch b/general/package/libevent-openipc/libevent-mbedtls.patch new file mode 100644 index 00000000..96a6d992 --- /dev/null +++ b/general/package/libevent-openipc/libevent-mbedtls.patch @@ -0,0 +1,16 @@ +diff --git a/bufferevent_mbedtls.c b/bufferevent_mbedtls.c +index f42da2ae..61f448a2 100644 +--- a/bufferevent_mbedtls.c ++++ b/bufferevent_mbedtls.c +@@ -57,8 +57,10 @@ static void + mbedtls_context_free(void *ssl, int flags) + { + struct mbedtls_context *ctx = ssl; +- if (flags & BEV_OPT_CLOSE_ON_FREE) ++ if (flags & BEV_OPT_CLOSE_ON_FREE) { + mbedtls_ssl_free(ctx->ssl); ++ free(ctx->ssl); ++ } + mm_free(ctx); + } + static int diff --git a/general/package/libevent-openipc/libevent-openipc.mk b/general/package/libevent-openipc/libevent-openipc.mk index 74d88cc0..ead145f7 100644 --- a/general/package/libevent-openipc/libevent-openipc.mk +++ b/general/package/libevent-openipc/libevent-openipc.mk @@ -34,6 +34,12 @@ define LIBEVENT_OPENIPC_REMOVE_PYSCRIPT rm $(TARGET_DIR)/usr/bin/event_rpcgen.py endef +define LIBEVENT_OPENIPC_DELETE_UNUSED + rm -f $(TARGET_DIR)/usr/lib/libevent-2.2.so.1.0.0 + rm -f $(TARGET_DIR)/usr/lib/libevent-2.2.so.1 + rm -f $(TARGET_DIR)/usr/lib/libevent.so +endef + # libevent installs a python script to target - get rid of it if we # don't have python support enabled ifneq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y) @@ -54,5 +60,7 @@ else LIBEVENT_OPENIPC_CONF_OPTS += --disable-mbedtls endif +LIBEVENT_OPENIPC_POST_INSTALL_TARGET_HOOKS += LIBEVENT_OPENIPC_DELETE_UNUSED + $(eval $(autotools-package)) $(eval $(host-autotools-package))