From 108934ac62cd9f46fe8f4e29e3a7cab660666ca2 Mon Sep 17 00:00:00 2001 From: Marco Casaroli Date: Wed, 28 Oct 2026 19:04:29 +0100 Subject: [PATCH] interpreters/luamodules/luasyslog: Do not define openlog() and closelog(). The Makefile and CMakeLists.txt defined openlog() and closelog() as macros for lsyslog.c. already gives both, so the macros are not necessary. When declares them as functions, the macros break the declarations and lsyslog.c does not compile. Remove the macros. lsyslog.c then uses openlog() and closelog() of . Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli --- interpreters/luamodules/luasyslog/CMakeLists.txt | 14 -------------- interpreters/luamodules/luasyslog/Makefile | 3 --- 2 files changed, 17 deletions(-) diff --git a/interpreters/luamodules/luasyslog/CMakeLists.txt b/interpreters/luamodules/luasyslog/CMakeLists.txt index 6f1fc2e1186..2046953cc4c 100644 --- a/interpreters/luamodules/luasyslog/CMakeLists.txt +++ b/interpreters/luamodules/luasyslog/CMakeLists.txt @@ -44,20 +44,6 @@ if(CONFIG_LUA_LSYSLOG_MODULE) endif() endif() - # ############################################################################ - # Flags - # ############################################################################ - set(LUA_SYSTEM_READLINE_DEF - [=[ -#define openlog(a,b,c) {(void)a; (void)c;} -#define closelog() {} -]=]) - - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/def_lua_readline.h - "${LUA_SYSTEM_READLINE_DEF}") - list(APPEND CFLAGS - "SHELL:-include ${CMAKE_CURRENT_BINARY_DIR}/def_lua_readline.h") - # ############################################################################ # Sources # ############################################################################ diff --git a/interpreters/luamodules/luasyslog/Makefile b/interpreters/luamodules/luasyslog/Makefile index 2421472f81d..1d53eccb450 100644 --- a/interpreters/luamodules/luasyslog/Makefile +++ b/interpreters/luamodules/luasyslog/Makefile @@ -32,9 +32,6 @@ LSYSLOG_SRC = $(LSYSLOG_UNPACK) VPATH += $(LSYSLOG_SRC) CSRCS = lsyslog.c -CFLAGS += -D'openlog(a,b,c)={(void)a; (void)c;}' -CFLAGS += -D'closelog()={}' - $(LSYSLOG_TARBALL): $(Q) echo "Downloading $(LSYSLOG_TARBALL) from $(LSYSLOG_URL)" $(Q) curl -O -L $(LSYSLOG_URL)