From cb03db5504c8b7b06326ec57f024be7639f5ac12 Mon Sep 17 00:00:00 2001 From: William Ahern Date: Wed, 22 Apr 2015 20:04:13 -0700 Subject: fix build for OpenBSD 5.6 libressl --- src/openssl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/openssl.c b/src/openssl.c index 9fc67c7..99a1ec0 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -81,7 +81,7 @@ #endif #ifndef HAVE_SSL_CTX_SET_ALPN_PROTOS -#define HAVE_SSL_CTX_SET_ALPN_PROTOS (OPENSSL_VERSION_NUMBER >= 0x1000200fL) +#define HAVE_SSL_CTX_SET_ALPN_PROTOS (OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined LIBRESSL_VERSION_NUMBER) #endif #ifndef HAVE_SSL_CTX_SET_ALPN_SELECT_CB @@ -1358,6 +1358,11 @@ int luaopen__openssl(lua_State *L) { lua_pushstring(L, SHLIB_VERSION_NUMBER); lua_setfield(L, -2, "SHLIB_VERSION_NUMBER"); +#if defined LIBRESSL_VERSION_NUMBER + auxL_pushinteger(L, LIBRESSL_VERSION_NUMBER); + lua_setfield(L, -2, "LIBRESSL_VERSION_NUMBER"); +#endif + return 1; } /* luaopen__openssl() */ -- cgit v1.2.3-59-g8ed1b