#define HAVE_ERR_REMOVE_THREAD_STATE
#endif
-+#if OPENSSL_VERSION_NUMBER < 0x10100005L
++#if (OPENSSL_VERSION_NUMBER < 0x10100005L) || defined(LIBRESSL_VERSION_NUMBER)
+static void RSA_get0_key(const RSA *r,
+ const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
+{