Copied Syscall6 from NetBSD/OpenBSD