summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-03-05 17:26:44 +0100
committerAttila Molnar <attilamolnar@hush.com>2015-03-05 17:26:44 +0100
commit24854545bdccea24d698772b1946d170af2197fb (patch)
tree4f95693b17c92a8b99a603ec4db06e34ae3245c0 /src/modules
parentece5c62d5733fd2355657962859cded0758a2dac (diff)
m_ssl_gnutls Add typedef for second parameter of gnutls_init() which changed in 2.99
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 7faa8976d..0bc7060b8 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -83,6 +83,14 @@ typedef gnutls_retr_st cert_cb_last_param_type;
#define INSPIRCD_GNUTLS_HAS_RECV_PACKET
#endif
+#if INSPIRCD_GNUTLS_HAS_VERSION(2, 99, 0)
+// The second parameter of gnutls_init() has changed in 2.99.0 from gnutls_connection_end_t to unsigned int
+// (it became a general flags parameter) and the enum has been deprecated and generates a warning on use.
+typedef unsigned int inspircd_gnutls_session_init_flags_t;
+#else
+typedef gnutls_connection_end_t inspircd_gnutls_session_init_flags_t;
+#endif
+
class RandGen : public HandlerBase2<void, char*, size_t>
{
public: