From 7bdf2557bbf7267542604567a0db809657b54d97 Mon Sep 17 00:00:00 2001 From: William Ahern Date: Wed, 10 Oct 2012 16:46:28 -0700 Subject: -n fix compile for LuaJIT --- openssl.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'openssl.c') diff --git a/openssl.c b/openssl.c index c0196bd..4ab0688 100644 --- a/openssl.c +++ b/openssl.c @@ -52,6 +52,9 @@ #include #include +#if LUA_VERSION_NUM < 502 +#include "compat52.h" +#endif #define BIGNUM_CLASS "OpenSSL Bignum" #define PUBKEY_CLASS "OpenSSL Pubkey" @@ -1665,7 +1668,11 @@ static int xc_digest(lua_State *L) { luaL_Buffer B; unsigned i; +#if LUA_VERSION_NUM < 502 + luaL_buffinit(L, &B); +#else luaL_buffinitsize(L, &B, 2 * len); +#endif for (i = 0; i < len; i++) { luaL_addchar(&B, x[0x0f & (md[i] >> 4)]); -- cgit v1.2.3-55-g6feb