diff options
author | William Ahern <william@Williams-MacBook-Air.local> | 2012-10-10 16:46:28 -0700 |
---|---|---|
committer | William Ahern <william@Williams-MacBook-Air.local> | 2012-10-10 16:46:28 -0700 |
commit | 7bdf2557bbf7267542604567a0db809657b54d97 (patch) | |
tree | 13ba523c6f40b70536bc4ca8c4cc661948f831a8 /openssl.c | |
parent | ac93581c90d8a1612ce01e3a308d572f98002924 (diff) | |
download | luaossl-7bdf2557bbf7267542604567a0db809657b54d97.tar.gz luaossl-7bdf2557bbf7267542604567a0db809657b54d97.tar.bz2 luaossl-7bdf2557bbf7267542604567a0db809657b54d97.zip |
-n
fix compile for LuaJIT
Diffstat (limited to 'openssl.c')
-rw-r--r-- | openssl.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -52,6 +52,9 @@ #include <lualib.h> #include <lauxlib.h> +#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)]); |