fix(test): fix C imports on macOS arm64

System headers on macOS arm64 contain 128-bit numeric types. These types
are built into clang and GCC as extensions. Unfortunately, they break
the LuaJIT C importer. Define dummy typedefs for the missing numeric
types to satisfy the ffi C importer.
This commit is contained in:
Jay 2023-04-03 10:27:14 +01:00 committed by GitHub
parent 10baf89712
commit f4cbe03606
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,7 +148,11 @@ local cdef = ffi.cdef
local cimportstr local cimportstr
local previous_defines_init = '' local previous_defines_init = [[
typedef struct { char bytes[16]; } __attribute__((aligned(16))) __uint128_t;
typedef struct { char bytes[16]; } __attribute__((aligned(16))) __float128;
]]
local preprocess_cache_init = {} local preprocess_cache_init = {}
local previous_defines_mod = '' local previous_defines_mod = ''
local preprocess_cache_mod = nil local preprocess_cache_mod = nil