0001-resources-Makefile.in-lua-fix-build-with-Lua-5.1.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From 3afcd237e509a6700c449056dcc5b9092af31e6a Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Mon, 6 Nov 2023 21:38:02 +0100
  4. Subject: [PATCH] resources/Makefile.in-lua: fix build with Lua 5.1
  5. Fix the following build failure with Lua 5.1 raised since version 1.16
  6. and
  7. https://github.com/civetweb/civetweb/commit/82ba5a04c9a1ca980d8dfe00c18e086017e8ab25:
  8. /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':
  9. lua_struct.c:(.text+0xce4): undefined reference to `luaL_newlib'
  10. Fixes:
  11. - http://autobuild.buildroot.org/results/7459b504e52f473c5830c0f3c7bffd037f6e1770
  12. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  13. Upstream: https://github.com/civetweb/civetweb/pull/1211
  14. ---
  15. resources/Makefile.in-lua | 2 ++
  16. 1 file changed, 2 insertions(+)
  17. diff --git a/resources/Makefile.in-lua b/resources/Makefile.in-lua
  18. index d3038f66..45f80181 100644
  19. --- a/resources/Makefile.in-lua
  20. +++ b/resources/Makefile.in-lua
  21. @@ -150,6 +150,7 @@ CFLAGS += -DUSE_LUA_FILE_SYSTEM
  22. #SOURCE_DIRS = $(LFS_DIR)
  23. +ifneq ($(WITH_LUA_VERSION), 501)
  24. LXX_DIR = src/third_party
  25. LXX_SOURCE_FILES = lua_struct.c
  26. LXX_SOURCES = $(addprefix $(LXX_DIR)/, $(LXX_SOURCE_FILES))
  27. @@ -159,6 +160,7 @@ OBJECTS += $(LXX_OBJECTS)
  28. CFLAGS += $(LXX_CFLAGS)
  29. CFLAGS += -DUSE_LUA_STRUCT
  30. #SOURCE_DIRS = $(LXX_DIR)
  31. +endif
  32. ifneq ($(WITH_LUA_VERSION), 501)
  33. --
  34. 2.42.0