diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index f967bd84fa87..1023e2faa0e6 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -61,6 +61,7 @@ local config = { abi_flags = "", abi_flags_mask = 0, abi_headers = "", + abi_intptr_t = "intptr_t", ptr_intptr_t_cast = "intptr_t", } @@ -398,9 +399,11 @@ local function write_line_pfile(tmppat, line) end end +-- Check both literal intptr_t and the abi version because this needs +-- to work both before and after the substitution local function isptrtype(type) return type:find("*") or type:find("caddr_t") or - type:find("intptr_t") + type:find("intptr_t") or type:find(config['abi_intptr_t']) end local process_syscall_def @@ -599,6 +602,8 @@ local function process_args(args) goto out end + argtype = argtype:gsub("intptr_t", config["abi_intptr_t"]) + -- XX TODO: Forward declarations? See: sysstubfwd in CheriBSD if abi_change then local abi_type_suffix = config["abi_type_suffix"]