ref: d59a17ec1e58b6496a1e32ce8bfb217eb7575d92
parent: 1c1d6536079c20ed0f0f606b075156b0069b70c3
author: Stefan Strogin <stefan.strogin@gmail.com>
date: Thu Sep 27 00:53:29 EDT 2018
http: fix compilation with LibreSSL LibreSSL defines OPENSSL_VERSION_NUMBER to 0x20000000L, but its API is compatible with OpenSSL 1.0.1. Therefore redefine OPENSSL_VERSION_NUMBER to 0x1000115fL (1.0.1u) if LibreSSL is used. Fixes: #2327
--- a/src/http.c
+++ b/src/http.c
@@ -358,6 +358,11 @@
# include <sys/timeb.h>
# include <openssl/x509v3.h>
+# if (defined(LIBRESSL_VERSION_NUMBER)&&OPENSSL_VERSION_NUMBER==0x20000000L)
+# undef OPENSSL_VERSION_NUMBER
+# define OPENSSL_VERSION_NUMBER 0x1000115fL
+# endif
+
/*The maximum number of simultaneous connections.
RFC 2616 says this SHOULD NOT be more than 2, but everyone on the modern web
ignores that (e.g., IE 8 bumped theirs up from 2 to 6, Firefox uses 15).