From: Baptiste Assmann Date: Mon, 2 Mar 2015 20:40:06 +0000 (+0100) Subject: BUILD: lua: missing ifdef related to SSL when enabling LUA X-Git-Tag: v1.6-dev1~77 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=84bb49328d78be405a51b9f5b3fa8486fc485239;p=thirdparty%2Fhaproxy.git BUILD: lua: missing ifdef related to SSL when enabling LUA A couple of ifdef are missing around SSL related functions in LUA. It prevents from compiling LUA without SSL. Current patch fix this. --- diff --git a/src/hlua.c b/src/hlua.c index 35253fa140..1df18b66ad 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -1546,6 +1546,7 @@ __LJMP static int hlua_socket_connect(struct lua_State *L) return 0; } +#ifdef USE_OPENSSL __LJMP static int hlua_socket_connect_ssl(struct lua_State *L) { struct hlua_socket *socket; @@ -1555,6 +1556,7 @@ __LJMP static int hlua_socket_connect_ssl(struct lua_State *L) socket->s->target = &socket_ssl.obj_type; return MAY_LJMP(hlua_socket_connect(L)); } +#endif __LJMP static int hlua_socket_setoption(struct lua_State *L) { @@ -3567,7 +3569,9 @@ void hlua_init(void) lua_pushstring(gL.T, "__index"); lua_newtable(gL.T); +#ifdef USE_OPENSSL hlua_class_function(gL.T, "connect_ssl", hlua_socket_connect_ssl); +#endif hlua_class_function(gL.T, "connect", hlua_socket_connect); hlua_class_function(gL.T, "send", hlua_socket_send); hlua_class_function(gL.T, "receive", hlua_socket_receive);