From 75f814930667e69f8b5817fb0c485169212f29a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= <cmn@dwim.me>
Date: Fri, 12 Dec 2014 08:55:33 +0100
Subject: [PATCH] MacOSX does not have the TLSv1_X_method() functions

The header does define TLS1_X_VERSION, but the version-specific
functions are not available.
---
 ctx.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ctx.go b/ctx.go
index f2683e2..57a7b4a 100644
--- a/ctx.go
+++ b/ctx.go
@@ -63,7 +63,7 @@ static long SSL_CTX_set_tmp_ecdh_not_a_macro(SSL_CTX* ctx, EC_KEY *key) {
 #endif
 
 static const SSL_METHOD *OUR_TLSv1_1_method() {
-#ifdef TLS1_1_VERSION
+#if defined(TLS1_1_VERSION) && !defined(OPENSSL_SYSNAME_MACOSX)
     return TLSv1_1_method();
 #else
     return NULL;
@@ -71,7 +71,7 @@ static const SSL_METHOD *OUR_TLSv1_1_method() {
 }
 
 static const SSL_METHOD *OUR_TLSv1_2_method() {
-#ifdef TLS1_2_VERSION
+#if defined(TLS1_2_VERSION) && !defined(OPENSSL_SYSNAME_MACOSX)
     return TLSv1_2_method();
 #else
     return NULL;