aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/libevent2/patches/0001-Do-not-check-for-ERR_remove_thread_state-do-not-link.patch
blob: d2677a1f61b5a9495a18451b6a406387880dc955 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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
---
 configure.ac          | 4 ----
 sample/https-client.c | 4 ----
 2 files changed, 8 deletions(-)

--- 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.)
--- 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());