diff --git a/src/tcp.c b/src/tcp.c index cc5b6a7..5876bfb 100644 --- a/src/tcp.c +++ b/src/tcp.c @@ -4,12 +4,7 @@ \*=========================================================================*/ #include "luasocket.h" -#include "lua.h" -#include "lauxlib.h" - -#include "compat.h" #include "auxiliar.h" - #include "socket.h" #include "inet.h" #include "options.h" @@ -129,7 +124,7 @@ static luaL_Reg func[] = { /*-------------------------------------------------------------------------*\ * Initializes module \*-------------------------------------------------------------------------*/ -LUASOCKET_PRIVATE int tcp_open(lua_State *L) +int tcp_open(lua_State *L) { /* create classes */ auxiliar_newclass(L, "tcp{master}", tcp_methods); diff --git a/src/tcp.h b/src/tcp.h index eded620..9b12b53 100644 --- a/src/tcp.h +++ b/src/tcp.h @@ -14,7 +14,7 @@ * tcp objects either connected to some address or returned by the accept * method of a server object. \*=========================================================================*/ -#include "lua.h" +#include "luasocket.h" #include "buffer.h" #include "timeout.h" @@ -30,6 +30,10 @@ typedef struct t_tcp_ { typedef t_tcp *p_tcp; +#pragma GCC visibility push(hidden) + int tcp_open(lua_State *L); +#pragma GCC visibility pop + #endif /* TCP_H */