From 24854545bdccea24d698772b1946d170af2197fb Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Thu, 5 Mar 2015 17:26:44 +0100 Subject: m_ssl_gnutls Add typedef for second parameter of gnutls_init() which changed in 2.99 --- src/modules/extra/m_ssl_gnutls.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/modules') 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 { public: -- cgit v1.2.3