You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
802 B

  1. diff --git a/evhtp.c b/evhtp.c
  2. index 24687be..b646925 100644
  3. --- a/evhtp.c
  4. +++ b/evhtp.c
  5. @@ -1667,9 +1667,9 @@ _evhtp_accept_cb(evserv_t * serv, int fd, struct sockaddr * s, int sl, void * ar
  6. #ifndef EVHTP_DISABLE_SSL
  7. #ifndef EVHTP_DISABLE_EVTHR
  8. -static unsigned long
  9. -_evhtp_ssl_get_thread_id(void) {
  10. - return (unsigned long)pthread_self();
  11. +static void
  12. +_evhtp_ssl_get_thread_id(CRYPTO_THREADID *id) {
  13. + CRYPTO_THREADID_set_numeric(id, (unsigned long)pthread_self());
  14. }
  15. static void
  16. @@ -2999,7 +2999,7 @@ evhtp_ssl_use_threads(void) {
  17. pthread_mutex_init(&(ssl_locks[i]), NULL);
  18. }
  19. - CRYPTO_set_id_callback(_evhtp_ssl_get_thread_id);
  20. + CRYPTO_THREADID_set_callback(_evhtp_ssl_get_thread_id);
  21. CRYPTO_set_locking_callback(_evhtp_ssl_thread_lock);
  22. return 0;