From 2be8e45d628012999e60bcce389aa7edc4d70ddb Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 11 Jun 2021 14:24:28 +0200 Subject: [PATCH] dnsdist: Fix compilation with GnuTLS < 3.4.0 --- pdns/tcpiohandler.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pdns/tcpiohandler.cc b/pdns/tcpiohandler.cc index 7efb0a410b..8532c03af5 100644 --- a/pdns/tcpiohandler.cc +++ b/pdns/tcpiohandler.cc @@ -871,7 +871,12 @@ public: gnutls_handshake_set_hook_function(d_conn.get(), GNUTLS_HANDSHAKE_NEW_SESSION_TICKET, GNUTLS_HOOK_POST, newTicketFromServerCb); } + /* The callback prototype changed in 3.4.0. */ +#if GNUTLS_VERSION_NUMBER >= 0x030400 static int newTicketFromServerCb(gnutls_session_t session, unsigned int htype, unsigned post, unsigned int incoming, const gnutls_datum_t* msg) +#else + static int newTicketFromServerCb(gnutls_session_t session, unsigned int htype, unsigned post, unsigned int incoming) +#endif /* GNUTLS_VERSION_NUMBER >= 0x030400 */ { if (htype != GNUTLS_HANDSHAKE_NEW_SESSION_TICKET || post != GNUTLS_HOOK_POST || session == nullptr) { return 0; -- 2.47.2