]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] rspamd_symcache.h: keep C linkage of lua.h for C++ includers 6126/head
authorVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 10 Jul 2026 07:38:03 +0000 (08:38 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 10 Jul 2026 07:38:03 +0000 (08:38 +0100)
commita9171bf1a0247a00f6c785635565cb47803f64af
tree8fddb0b5499c1ce6acc8428f98b10ccf8d84e174
parent62d6e8acb02aedf7f9b3fa51020cc34748a3c16c
[Fix] rspamd_symcache.h: keep C linkage of lua.h for C++ includers

The raw lua.h include sat outside extern "C", so any C++ unit that
pulled rspamd_symcache.h before lua/lua_common.h got C++-mangled
declarations of the Lua C API and failed to link. Including
lua_common.h itself is not an option due to the include cycle via
rspamd.h -> cfg_file.h -> rspamd_symcache.h, so wrap lua.h the same
way lua_common.h does. This also lets composites sources include
lua_common.h in the natural position instead of first.
src/libserver/composites/composites.cxx
src/libserver/composites/composites_manager.cxx
src/libserver/rspamd_symcache.h