aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/libevent2/patches
diff options
context:
space:
mode:
authorLeon M. George <leon@georgemail.eu>2016-10-31 14:55:44 +0100
committerJohn Crispin <john@phrozen.org>2018-07-30 10:43:37 +0200
commit025688794d516d5b020abfdaabf47fe341e37da6 (patch)
tree70a7e8d0c34b6f7847160ada1277f723b49d2f6b /package/libs/libevent2/patches
parent974a2b1aa9b0f8bd7a7442efa069d954e6b354ce (diff)
downloadupstream-025688794d516d5b020abfdaabf47fe341e37da6.tar.gz
upstream-025688794d516d5b020abfdaabf47fe341e37da6.tar.bz2
upstream-025688794d516d5b020abfdaabf47fe341e37da6.zip
libevent: update to 2.1.8
Signed-off-by: Leon M. George <leon@georgemail.eu>
Diffstat (limited to 'package/libs/libevent2/patches')
-rw-r--r--package/libs/libevent2/patches/0001-Do-not-check-for-ERR_remove_thread_state-do-not-link.patch87
1 files changed, 87 insertions, 0 deletions
diff --git a/package/libs/libevent2/patches/0001-Do-not-check-for-ERR_remove_thread_state-do-not-link.patch b/package/libs/libevent2/patches/0001-Do-not-check-for-ERR_remove_thread_state-do-not-link.patch
new file mode 100644
index 0000000000..a839de0713
--- /dev/null
+++ b/package/libs/libevent2/patches/0001-Do-not-check-for-ERR_remove_thread_state-do-not-link.patch
@@ -0,0 +1,87 @@
+From f519e0f30a00393b949c4e20868952726a9c6d2e Mon Sep 17 00:00:00 2001
+From: Pierce Lopez <pierce.lopez@gmail.com>
+Date: Thu, 2 Mar 2017 21:09:32 -0500
+Subject: [PATCH] Do not check for ERR_remove_thread_state() (do not link ssl
+ into every library)
+
+This reverts commit c4e9d9bd662de7f575f2172c160795d452ebe709
+("sample/https-client: check for ERR_remove_thread_state() existence").
+
+Calling AC_SEARCH_LIBS() modifies LIBS - -lcrypto incorrectly
+ends up in LIBS, and thus linked to by libevent_core.so.
+
+Checking for ERR_remove_thread_state should no longer be needed
+because it was introduced in openssl 1.0.0, and the previous line
+0.9.8 had support discontinued at the end of 2015.
+
+Fixes: #473
+---
+ CMakeLists.txt | 4 ----
+ configure.ac | 4 ----
+ event-config.h.cmake | 3 ---
+ sample/https-client.c | 4 ----
+ 4 files changed, 15 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b4a34f3d..28d6c22c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -877,10 +877,6 @@ if (NOT EVENT__DISABLE_SAMPLES)
+ time-test)
+
+ if (NOT EVENT__DISABLE_OPENSSL AND OPENSSL_LIBRARIES)
+- set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES})
+- CHECK_FUNCTION_EXISTS_EX(ERR_remove_thread_state EVENT__HAVE_ERR_REMOVE_THREAD_STATE)
+- set(CMAKE_REQUIRED_LIBRARIES "")
+-
+ # Special sample with more than one file.
+ add_executable(https-client
+ sample/https-client.c
+diff --git a/configure.ac b/configure.ac
+index 7528d37e..3f137277 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -791,10 +791,6 @@ fi
+
+ # check if we have and should use openssl
+ AM_CONDITIONAL(OPENSSL, [test "$enable_openssl" != "no" && test "$have_openssl" = "yes"])
+-if test "x$enable_openssl" = "xyes"; then
+- AC_SEARCH_LIBS([ERR_remove_thread_state], [crypto eay32],
+- [AC_DEFINE(HAVE_ERR_REMOVE_THREAD_STATE, 1, [Define to 1 if you have ERR_remove_thread_stat().])])
+-fi
+
+ # Add some more warnings which we use in development but not in the
+ # released versions. (Some relevant gcc versions can't handle these.)
+diff --git a/event-config.h.cmake b/event-config.h.cmake
+index c1355be9..cb363be8 100644
+--- a/event-config.h.cmake
++++ b/event-config.h.cmake
+@@ -523,9 +523,6 @@
+
+ #cmakedefine EVENT__NEED_DLLIMPORT
+
+-/* Define to 1 if you have ERR_remove_thread_stat(). */
+-#cmakedefine EVENT__HAVE_ERR_REMOVE_THREAD_STATE
+-
+ /* Define if waitpid() supports WNOWAIT */
+ #cmakedefine EVENT__HAVE_WAITPID_WITH_WNOWAIT
+
+diff --git a/sample/https-client.c b/sample/https-client.c
+index 74839565..2ed6fb74 100644
+--- a/sample/https-client.c
++++ b/sample/https-client.c
+@@ -484,11 +484,7 @@ cleanup:
+ EVP_cleanup();
+ ERR_free_strings();
+
+-#ifdef EVENT__HAVE_ERR_REMOVE_THREAD_STATE
+ ERR_remove_thread_state(NULL);
+-#else
+- ERR_remove_state(0);
+-#endif
+ CRYPTO_cleanup_all_ex_data();
+
+ sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
+--
+2.17.0
+