From f3a8766954685ac520d7e6db660f2d00b56c4683 Mon Sep 17 00:00:00 2001 From: Philip Prindeville Date: Fri, 24 Mar 2017 22:09:46 -0600 Subject: [PATCH] syslog-ng: fix openssl callbacks to not require backward compatibility The functions for registering callbacks for threads has changed in OpenSSL 1.0.0. Signed-off-by: Philip Prindeville --- admin/syslog-ng/Makefile | 2 +- .../patches/100-use-1.0.2k-threadids.patch | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 admin/syslog-ng/patches/100-use-1.0.2k-threadids.patch diff --git a/admin/syslog-ng/Makefile b/admin/syslog-ng/Makefile index 2264079a7..0a2c99bf0 100644 --- a/admin/syslog-ng/Makefile +++ b/admin/syslog-ng/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=syslog-ng PKG_VERSION:=3.9.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=W. Michael Petullo diff --git a/admin/syslog-ng/patches/100-use-1.0.2k-threadids.patch b/admin/syslog-ng/patches/100-use-1.0.2k-threadids.patch new file mode 100644 index 000000000..17c005aa8 --- /dev/null +++ b/admin/syslog-ng/patches/100-use-1.0.2k-threadids.patch @@ -0,0 +1,35 @@ +--- a/lib/crypto.c 2016-12-21 07:57:44.000000000 -0700 ++++ b/lib/crypto.c 2017-03-24 13:19:34.188259018 -0600 +@@ -51,11 +51,20 @@ + } + } + ++#if OPENSSL_VERSION_NUMBER < 0x10000000 + static unsigned long + ssl_thread_id(void) + { + return (unsigned long) get_thread_id(); + } ++ ++#else ++static void ++ssl_thread_id2(CRYPTO_THREADID *id) ++{ ++ CRYPTO_THREADID_set_numeric(id, get_thread_id()); ++} ++#endif + + static void + crypto_init_threading(void) +@@ -68,7 +76,11 @@ + { + g_static_mutex_init(&ssl_locks[i]); + } ++#if OPENSSL_VERSION_NUMBER < 0x10000000 + CRYPTO_set_id_callback(ssl_thread_id); ++#else ++ CRYPTO_THREADID_set_callback(ssl_thread_id2); ++#endif + CRYPTO_set_locking_callback(ssl_locking_callback); + } +