aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchamptar <champetier.etienne@gmail.com>2016-08-18 16:00:16 +0200
committerGitHub <noreply@github.com>2016-08-18 16:00:16 +0200
commite128a2c3d9310d74fff6dfff79be56a0dc0c86c9 (patch)
tree68a982eb5a7c12eef0fdded0406da164b0437e0f
parentb2c20d4f223bc097806b4a9a32c6869f53ce6b21 (diff)
parent32f6b85a52de9335bdfdd012ae718bed45f370f7 (diff)
Merge pull request #3035 from jow-/luasec-no-compression-fix
luasec: fix build with OPENSSL_NO_COMP
-rw-r--r--lang/luasec/Makefile2
-rw-r--r--lang/luasec/patches/200-compression-method-fix.patch24
2 files changed, 25 insertions, 1 deletions
diff --git a/lang/luasec/Makefile b/lang/luasec/Makefile
index 6429b2d3e..532fd303e 100644
--- a/lang/luasec/Makefile
+++ b/lang/luasec/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luasec
PKG_VERSION:=0.5.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/brunoos/luasec/archive/
diff --git a/lang/luasec/patches/200-compression-method-fix.patch b/lang/luasec/patches/200-compression-method-fix.patch
new file mode 100644
index 000000000..e249bfb75
--- /dev/null
+++ b/lang/luasec/patches/200-compression-method-fix.patch
@@ -0,0 +1,24 @@
+--- a/src/ssl.c
++++ b/src/ssl.c
+@@ -401,17 +401,21 @@ static int meth_want(lua_State *L)
+ */
+ static int meth_compression(lua_State *L)
+ {
++#ifndef OPENSSL_NO_COMP
+ const COMP_METHOD *comp;
++#endif
+ p_ssl ssl = (p_ssl)luaL_checkudata(L, 1, "SSL:Connection");
+ if (ssl->state != LSEC_STATE_CONNECTED) {
+ lua_pushnil(L);
+ lua_pushstring(L, "closed");
+ return 2;
+ }
++#ifndef OPENSSL_NO_COMP
+ comp = SSL_get_current_compression(ssl->ssl);
+ if (comp)
+ lua_pushstring(L, SSL_COMP_get_name(comp));
+ else
++#endif
+ lua_pushnil(L);
+ return 1;
+ }