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.
This commit is contained in:
Baptiste Assmann 2015-03-02 21:40:06 +01:00 committed by Willy Tarreau
parent 928ae5c822
commit 84bb49328d

View File

@ -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);