aboutsummaryrefslogtreecommitdiff
path: root/libs/libevhtp/patches
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2018-11-06 11:35:21 -0800
committerRosen Penev <rosenp@gmail.com>2018-11-06 11:35:21 -0800
commita5c9c79797a7a94088e1d77618fdd101510e1f6b (patch)
tree4da1a60b3f84a98ae68ad2a797cb1d9b830cd7ed /libs/libevhtp/patches
parentd2d2df63d5a2078be3e9d48160b82da6b4bb4bb4 (diff)
libevhtp: Fix compilation on OpenSSL 1.0.2 without deprecated APIs
Also switched to the proper upstream. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'libs/libevhtp/patches')
-rw-r--r--libs/libevhtp/patches/021-openssl-thread.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/libs/libevhtp/patches/021-openssl-thread.patch b/libs/libevhtp/patches/021-openssl-thread.patch
new file mode 100644
index 000000000..4e984e589
--- /dev/null
+++ b/libs/libevhtp/patches/021-openssl-thread.patch
@@ -0,0 +1,26 @@
+diff --git a/evhtp.c b/evhtp.c
+index 24687be..b646925 100644
+--- a/evhtp.c
++++ b/evhtp.c
+@@ -1667,9 +1667,9 @@ _evhtp_accept_cb(evserv_t * serv, int fd, struct sockaddr * s, int sl, void * ar
+
+ #ifndef EVHTP_DISABLE_SSL
+ #ifndef EVHTP_DISABLE_EVTHR
+-static unsigned long
+-_evhtp_ssl_get_thread_id(void) {
+- return (unsigned long)pthread_self();
++static void
++_evhtp_ssl_get_thread_id(CRYPTO_THREADID *id) {
++ CRYPTO_THREADID_set_numeric(id, (unsigned long)pthread_self());
+ }
+
+ static void
+@@ -2999,7 +2999,7 @@ evhtp_ssl_use_threads(void) {
+ pthread_mutex_init(&(ssl_locks[i]), NULL);
+ }
+
+- CRYPTO_set_id_callback(_evhtp_ssl_get_thread_id);
++ CRYPTO_THREADID_set_callback(_evhtp_ssl_get_thread_id);
+ CRYPTO_set_locking_callback(_evhtp_ssl_thread_lock);
+
+ return 0;