]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Fix compilation with GnuTLS < 3.4.0
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 11 Jun 2021 12:24:28 +0000 (14:24 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 26 Aug 2021 14:30:28 +0000 (16:30 +0200)
pdns/tcpiohandler.cc

index 7efb0a410ba3d160bf544f95ecab1565ac0db924..8532c03af5385488419ee103cd64aa722bb69e98 100644 (file)
@@ -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;