From f6a88e1ee6d62dc447a8d8b1d77d63f1ab9b5ade Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sun, 19 Mar 2023 20:39:32 +0000 Subject: add support for lua 5.1 uses a weak-keyed table in the registry to store parent-child mappings, instead of associated uservalues, which were only added in 5.2. --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4b4860a..21d3629 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,11 @@ LUA_VER=5.3 CC = cc LD = ld -CFLAGS = -std=c99 -Wall -O2 -fPIC -I/usr/include/lua$(LUA_VER) +MORE_CFLAGS= +ifeq ($(LUA_VER),5.1) + MORE_CFLAGS=-DLUA_5_1 +endif +CFLAGS = $(MORE_CFLAGS) -std=c99 -Wall -O2 -fPIC -I/usr/include/lua$(LUA_VER) LFLAGS = -shared -llmdb lmdb.so: lmdb.o -- cgit v1.2.3