Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

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

Signed-off-by: Dominyk Tiller <[email protected]>
  • Loading branch information
DomT4 committed Mar 24, 2016
1 parent 16d9c85 commit 39fd8dd
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Library/Formula/curl.rb
Original file line number Diff line number Diff line change
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 39fd8dd

Please sign in to comment.