diff options
author | Jay <jaysandhu1993@gmail.com> | 2023-04-03 10:27:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-03 10:27:14 +0100 |
commit | f4cbe0360651123d7f33ddbaa046f797c7d73671 (patch) | |
tree | e34e4a3971fbecb3cc29b06a286659692a0e4605 | |
parent | 10baf89712724b4b95f7c641f2012f051737003c (diff) | |
download | rneovim-f4cbe0360651123d7f33ddbaa046f797c7d73671.tar.gz rneovim-f4cbe0360651123d7f33ddbaa046f797c7d73671.tar.bz2 rneovim-f4cbe0360651123d7f33ddbaa046f797c7d73671.zip |
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.
-rw-r--r-- | test/unit/helpers.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/unit/helpers.lua b/test/unit/helpers.lua index 686af3b461..708929ad9f 100644 --- a/test/unit/helpers.lua +++ b/test/unit/helpers.lua @@ -148,7 +148,11 @@ local cdef = ffi.cdef 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 previous_defines_mod = '' local preprocess_cache_mod = nil |