about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMarco Peereboom <marco@conformal.com>2012-01-24 10:45:34 -0600
committerMarco Peereboom <marco@conformal.com>2012-01-24 10:45:34 -0600
commitee1982fb44d75dd9b077145f85c12e6af73e2c1d (patch)
tree8b44d2b63a06bb81c2aed4be35722d996a4ba9c6
parentd0d2fe377c526dcd3e04b89cbdd49501df4e9288 (diff)
downloadxombrero-ee1982fb44d75dd9b077145f85c12e6af73e2c1d.tar.gz
replace gnutls_strerror_name with a dummy string when the version is too old
-rw-r--r--xxxterm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xxxterm.c b/xxxterm.c
index 881f69b..e8a5205 100644
--- a/xxxterm.c
+++ b/xxxterm.c
@@ -1587,7 +1587,11 @@ start_tls(const gchar **error_str, int s, gnutls_session_t *gs,
 		    "gnutls_handshake failed %d fatal %d %s",
 		    rv,
 		    gnutls_error_is_fatal(rv),
+#if LIBGNUTLS_VERSION_MAJOR >= 2 && LIBGNUTLS_VERSION_MINOR >= 6
 		    gnutls_strerror_name(rv));
+#else
+		    "GNUTLS version is too old to provide human readable error");
+#endif
 		stop_tls(gsession, xcred);
 		goto done;
 	}