Create os-syscall.h. The purpose of this file is to define anything that's different among the BSDs, like system call numbers and time_t. While there's a lot more different between the BSDs, this is at least a start at capturing it.
Signed-off-by: Warner Losh <[email protected]> --- bsd-user/freebsd/os-syscall.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/bsd-user/freebsd/os-syscall.h b/bsd-user/freebsd/os-syscall.h new file mode 100644 index 0000000000..962adfa91a --- /dev/null +++ b/bsd-user/freebsd/os-syscall.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 Warner Losh <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + * + * OS-Specific portion of syscall_defs.h + */ + +#include "syscall_nr.h" + +/* + * FreeBSD uses a 64bits time_t except on i386 so we have to add a special case + * here. + */ +#if defined(TARGET_I386) && !defined(TARGET_X86_64) +typedef int32_t target_time_t; +#else +typedef int64_t target_time_t; +#endif + +typedef abi_long target_suseconds_t; -- 2.52.0
