Browse Source

resources/Makefile.in-lua: fix build with Lua 5.1

Fix the following build failure with Lua 5.1 raised since version 1.16
and
https://github.com/civetweb/civetweb/commit/82ba5a04c9a1ca980d8dfe00c18e086017e8ab25:

/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sh4-buildroot-linux-gnu/13.2.0/../../../../sh4-buildroot-linux-gnu/bin/ld: out/src/third_party/lua_struct.o: in function `luaopen_struct':
lua_struct.c:(.text+0xce4): undefined reference to `luaL_newlib'

Fixes:
 - http://autobuild.buildroot.org/results/7459b504e52f473c5830c0f3c7bffd037f6e1770

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Fabrice Fontaine 1 year ago
parent
commit
3afcd237e5
1 changed files with 2 additions and 0 deletions
  1. 2 0
      resources/Makefile.in-lua

+ 2 - 0
resources/Makefile.in-lua

@@ -150,6 +150,7 @@ CFLAGS += -DUSE_LUA_FILE_SYSTEM
 #SOURCE_DIRS = $(LFS_DIR)
 
 
+ifneq ($(WITH_LUA_VERSION), 501)
 LXX_DIR = src/third_party
 LXX_SOURCE_FILES = lua_struct.c
 LXX_SOURCES = $(addprefix $(LXX_DIR)/, $(LXX_SOURCE_FILES))
@@ -159,6 +160,7 @@ OBJECTS += $(LXX_OBJECTS)
 CFLAGS += $(LXX_CFLAGS)
 CFLAGS += -DUSE_LUA_STRUCT
 #SOURCE_DIRS = $(LXX_DIR)
+endif
 
 
 ifneq ($(WITH_LUA_VERSION), 501)