Given a function with varargs, like the posix open function, there's currently no way to declare it using def-external as taking varargs, much less call it with a variable number of arguments. We can currently fake it by treating it as a fixed arguments funuction on platforms that treat varargs transparently (like x64), but that fails on arm64 (as discovered by @casuallyblue). So let's figure out how to support varargs properly.
Given a function with varargs, like the posix
open
function, there's currently no way to declare it usingdef-external
as taking varargs, much less call it with a variable number of arguments. We can currently fake it by treating it as a fixed arguments funuction on platforms that treat varargs transparently (like x64), but that fails on arm64 (as discovered by @casuallyblue). So let's figure out how to support varargs properly.