diff --git a/lib/gtls.c b/lib/gtls.c
index 7ca46c8..4a41c47 100644
--- a/lib/gtls.c
+++ b/lib/gtls.c
@@ -78,6 +78,11 @@ static void tls_log_func(int level, const char *str)
 #endif
 static bool gtls_inited = FALSE;
 
+#if defined(GNUTLS_VERSION_NUMBER) && (GNUTLS_VERSION_NUMBER >= 0x020c00)
+#  define gnutls_transport_set_global_errno(A)  SET_ERRNO((A))
+#  define gnutls_transport_set_lowat(A,B)       Curl_nop_stmt
+#endif
+
 /*
  * Custom push and pull callback functions used by GNU TLS to read and write
  * to the socket.  These functions are simple wrappers to send() and recv()
@@ -476,10 +481,8 @@ gtls_connect_step1(struct connectdata *conn,
   gnutls_transport_set_push_function(session, Curl_gtls_push);
   gnutls_transport_set_pull_function(session, Curl_gtls_pull);
 
-#if GNUTLS_VERSION_NUMBER < 0x020c00
   /* lowat must be set to zero when using custom push and pull functions. */
   gnutls_transport_set_lowat(session, 0);
-#endif
 
   /* This might be a reconnect, so we check for a session ID in the cache
      to speed up things */
