diff options
| -rw-r--r-- | include/mod_gnutls.h.in | 1 | ||||
| -rw-r--r-- | src/gnutls_hooks.c | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/mod_gnutls.h.in b/include/mod_gnutls.h.in index 58eed1b..6d5e5ba 100644 --- a/include/mod_gnutls.h.in +++ b/include/mod_gnutls.h.in | |||
| @@ -27,7 +27,6 @@ | |||
| 27 | #include "apr_tables.h" | 27 | #include "apr_tables.h" |
| 28 | #include "ap_release.h" | 28 | #include "ap_release.h" |
| 29 | 29 | ||
| 30 | #include <gcrypt.h> | ||
| 31 | #include <gnutls/gnutls.h> | 30 | #include <gnutls/gnutls.h> |
| 32 | #include <gnutls/extra.h> | 31 | #include <gnutls/extra.h> |
| 33 | #include <gnutls/openpgp.h> | 32 | #include <gnutls/openpgp.h> |
diff --git a/src/gnutls_hooks.c b/src/gnutls_hooks.c index 0718e20..8bb0059 100644 --- a/src/gnutls_hooks.c +++ b/src/gnutls_hooks.c | |||
| @@ -20,6 +20,10 @@ | |||
| 20 | #include "http_vhost.h" | 20 | #include "http_vhost.h" |
| 21 | #include "ap_mpm.h" | 21 | #include "ap_mpm.h" |
| 22 | 22 | ||
| 23 | #if GNUTLS_VERSION_MAJOR <= 2 && GNUTLS_VERSION_MINOR < 11 | ||
| 24 | #include <gcrypt.h> | ||
| 25 | #endif | ||
| 26 | |||
| 23 | #if !USING_2_1_RECENT | 27 | #if !USING_2_1_RECENT |
| 24 | extern server_rec *ap_server_conf; | 28 | extern server_rec *ap_server_conf; |
| 25 | #endif | 29 | #endif |
| @@ -83,13 +87,16 @@ int ret; | |||
| 83 | 87 | ||
| 84 | #if APR_HAS_THREADS | 88 | #if APR_HAS_THREADS |
| 85 | ap_mpm_query(AP_MPMQ_IS_THREADED, &mpm_is_threaded); | 89 | ap_mpm_query(AP_MPMQ_IS_THREADED, &mpm_is_threaded); |
| 90 | #if (GNUTLS_VERSION_MAJOR == 2 && GNUTLS_VERSION_MINOR < 11) || GNUTLS_VERSION_MAJOR < 2 | ||
| 86 | if (mpm_is_threaded) { | 91 | if (mpm_is_threaded) { |
| 87 | gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); | 92 | gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); |
| 88 | } | 93 | } |
| 94 | #endif | ||
| 89 | #else | 95 | #else |
| 90 | mpm_is_threaded = 0; | 96 | mpm_is_threaded = 0; |
| 91 | #endif | 97 | #endif |
| 92 | 98 | ||
| 99 | |||
| 93 | if (gnutls_check_version(LIBGNUTLS_VERSION)==NULL) { | 100 | if (gnutls_check_version(LIBGNUTLS_VERSION)==NULL) { |
| 94 | _gnutls_log(debug_log_fp, "gnutls_check_version() failed. Required: gnutls-%s Found: gnutls-%s\n", | 101 | _gnutls_log(debug_log_fp, "gnutls_check_version() failed. Required: gnutls-%s Found: gnutls-%s\n", |
| 95 | LIBGNUTLS_VERSION, gnutls_check_version(NULL)); | 102 | LIBGNUTLS_VERSION, gnutls_check_version(NULL)); |
