summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compat52.h8
-rw-r--r--src/openssl.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/compat52.h b/src/compat52.h
index 0057b3c..22541f7 100644
--- a/src/compat52.h
+++ b/src/compat52.h
@@ -23,6 +23,14 @@
23 * USE OR OTHER DEALINGS IN THE SOFTWARE. 23 * USE OR OTHER DEALINGS IN THE SOFTWARE.
24 * ========================================================================== 24 * ==========================================================================
25 */ 25 */
26
27
28#if LUA_VERSION_NUM < 503
29
30#define lua_getfield(L, i, f) (lua_getfield(L, (i), (f)), lua_type(L, -1))
31
32#endif
33
26#if LUA_VERSION_NUM < 502 34#if LUA_VERSION_NUM < 502
27 35
28#define LUA_OK 0 36#define LUA_OK 0
diff --git a/src/openssl.c b/src/openssl.c
index 9ea9469..1307852 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -74,9 +74,7 @@
74#include <lualib.h> 74#include <lualib.h>
75#include <lauxlib.h> 75#include <lauxlib.h>
76 76
77#if LUA_VERSION_NUM < 502
78#include "compat52.h" 77#include "compat52.h"
79#endif
80 78
81#define GNUC_2VER(M, m, p) (((M) * 10000) + ((m) * 100) + (p)) 79#define GNUC_2VER(M, m, p) (((M) * 10000) + ((m) * 100) + (p))
82#define GNUC_PREREQ(M, m, p) (__GNUC__ > 0 && GNUC_2VER(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) >= GNUC_2VER((M), (m), (p))) 80#define GNUC_PREREQ(M, m, p) (__GNUC__ > 0 && GNUC_2VER(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) >= GNUC_2VER((M), (m), (p)))