Skip to content

Commit

Permalink
curl: add upstream LibreSSL fix
Browse files Browse the repository at this point in the history
Closes Homebrew/legacy-homebrew#50379.
Closes Homebrew/legacy-homebrew#50385.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
  • Loading branch information
DomT4 authored and xu-cheng committed Mar 26, 2016
1 parent d0398a6 commit d01810f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Formula/curl.rb
Expand Up @@ -45,6 +45,12 @@ class Curl < Formula
depends_on "libressl" => :optional
depends_on "nghttp2" => :optional

# This patch fixes compile against LibreSSL. From:
# https://github.com/curl/curl/commit/240cd84b494e0ff
# https://github.com/curl/curl/commit/23ab4816443e2b9
# Can be removed on the next release.
patch :DATA

def install
# Throw an error if someone actually tries to rock both SSL choices.
# Long-term, make this singular-ssl-option-only a requirement.
Expand Down Expand Up @@ -101,3 +107,19 @@ def install
filename.verify_checksum stable.checksum
end
end

__END__
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index cbf2d21..f8ccb23 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -95,7 +95,8 @@

#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
#define HAVE_ERR_REMOVE_THREAD_STATE 1
-#if (OPENSSL_VERSION_NUMBER >= 0x10100004L)
+#if (OPENSSL_VERSION_NUMBER >= 0x10100004L) && \
+ !defined(LIBRESSL_VERSION_NUMBER)
/* OpenSSL 1.1.0-pre4 removed the argument! */
#define HAVE_ERR_REMOVE_THREAD_STATE_NOARG 1
#endif

0 comments on commit d01810f

Please sign in to comment.