mirror of
https://github.com/brunoos/luasec.git
synced 2024-11-08 06:28:26 +01:00
LuaRocks workaround
This commit is contained in:
parent
9f6d623ccb
commit
6b82fa6104
@ -93,21 +93,6 @@ build = {
|
||||
"src/luasocket/timeout.c", "src/luasocket/wsocket.c"
|
||||
}
|
||||
}
|
||||
},
|
||||
patches = {
|
||||
["luarocks_vs_compiler.patch"] = [[
|
||||
--- a/src/ssl.c.orig
|
||||
+++ b/src/ssl.c
|
||||
@@ -844,3 +844,8 @@ LSEC_API int luaopen_ssl_core(lua_State *L)
|
||||
|
||||
return 1;
|
||||
}
|
||||
+
|
||||
+#if defined(_MSC_VER)
|
||||
+/* Empty implementation to allow building with LuaRocks and MS compilers */
|
||||
+LSEC_API int luaopen_ssl(lua_State *L) { return 0; }
|
||||
+#endif
|
||||
]]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
13
src/ssl.c
13
src/ssl.c
@ -854,3 +854,16 @@ LSEC_API int luaopen_ssl_core(lua_State *L)
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
|
||||
/* Empty implementation to allow building with LuaRocks and MS compilers */
|
||||
LSEC_API int luaopen_ssl(lua_State *L) {
|
||||
lua_pushstring(L, "you should not call this function");
|
||||
lua_error(L);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user