2 Commits

Author SHA1 Message Date
989ee5f993 Add compatibility flat to OpenSSL 1.1.1 version
Avoid deprecated messages until the code is fully compliant with version 3.x
2025-07-10 12:05:16 -03:00
fa16e04293 Fix: use luaL_register instead of luaL_openlib 2025-07-10 10:33:50 -03:00
3 changed files with 5 additions and 4 deletions

View File

@ -6,7 +6,7 @@ LUACPATH ?= /usr/lib/lua/5.1
# Comment this lines if you will link with non-internal LuaSocket's help files # Comment this lines if you will link with non-internal LuaSocket's help files
# and edit INCDIR and LIBDIR properly. # and edit INCDIR and LIBDIR properly.
EXTRA = luasocket EXTRA = luasocket
DEFS = -DWITH_LUASOCKET DEFS = -DWITH_LUASOCKET -DOPENSSL_API_COMPAT=0x10101000L
# Edit the lines below to inform new path, if necessary. # Edit the lines below to inform new path, if necessary.
# Path below points to internal LuaSocket's help files. # Path below points to internal LuaSocket's help files.

View File

@ -46,7 +46,7 @@ build = {
modules = { modules = {
ssl = { ssl = {
defines = { defines = {
"WITH_LUASOCKET", "LUASOCKET_DEBUG", "WITH_LUASOCKET", "LUASOCKET_DEBUG", "OPENSSL_API_COMPAT=0x10101000L"
}, },
incdirs = { incdirs = {
"$(OPENSSL_INCDIR)", "src/", "src/luasocket", "$(OPENSSL_INCDIR)", "src/", "src/luasocket",
@ -80,7 +80,8 @@ build = {
defines = { defines = {
"WIN32", "NDEBUG", "_WINDOWS", "_USRDLL", "LSEC_EXPORTS", "BUFFER_DEBUG", "LSEC_API=__declspec(dllexport)", "WIN32", "NDEBUG", "_WINDOWS", "_USRDLL", "LSEC_EXPORTS", "BUFFER_DEBUG", "LSEC_API=__declspec(dllexport)",
"WITH_LUASOCKET", "LUASOCKET_DEBUG", "WITH_LUASOCKET", "LUASOCKET_DEBUG",
"LUASEC_INET_NTOP", "WINVER=0x0501", "_WIN32_WINNT=0x0501", "NTDDI_VERSION=0x05010300" "LUASEC_INET_NTOP", "WINVER=0x0501", "_WIN32_WINNT=0x0501", "NTDDI_VERSION=0x05010300",
"OPENSSL_API_COMPAT=0x10101000L"
}, },
libdirs = { libdirs = {
"$(OPENSSL_LIBDIR)", "$(OPENSSL_LIBDIR)",

View File

@ -146,7 +146,7 @@ int timeout_open(lua_State *L) {
#if LUA_VERSION_NUM > 501 && !defined(LUA_COMPAT_MODULE) #if LUA_VERSION_NUM > 501 && !defined(LUA_COMPAT_MODULE)
luaL_setfuncs(L, func, 0); luaL_setfuncs(L, func, 0);
#else #else
luaL_openlib(L, NULL, func, 0); luaL_register(L, NULL, func);
#endif #endif
return 0; return 0;
} }