fix(tests): filter out lines with __typeof__ keyword (#32524)

Problem: On 32-bit architectures, musl libc makes heavy use of
__typeof__ as part of its __REDIR macro for optional backwards
compatibility with 32-bit time_t values. Unfortunately, the
__typeof__ keyword is not supported by the LuaJIT C parser.

Solution: Filter out the keyword in filter_complex_blocks.
(cherry picked from commit db2c3d1143)
This commit is contained in:
Sören Tempel
2025-02-21 23:37:15 +00:00
committed by github-actions[bot]
parent 00d3956109
commit e6432b0094

View File

@@ -146,6 +146,8 @@ local function filter_complex_blocks(body)
or string.find(line, 'value_init_')
or string.find(line, 'UUID_NULL') -- static const uuid_t UUID_NULL = {...}
or string.find(line, 'inline _Bool')
-- used by musl libc headers on 32-bit arches via __REDIR marco
or string.find(line, '__typeof__')
-- used by macOS headers
or string.find(line, 'typedef enum : ')
or string.find(line, 'mach_vm_range_recipe')