diff --git a/luasec-0.6-1.rockspec b/luasec-0.6-1.rockspec index 1114ce5..65ecc6d 100644 --- a/luasec-0.6-1.rockspec +++ b/luasec-0.6-1.rockspec @@ -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 -]] } } } diff --git a/src/ssl.c b/src/ssl.c index 1e4c6c4..fc1ab98 100644 --- a/src/ssl.c +++ b/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