From: "Stacey D. Son"
Add struct target_sockaddr definition for socket address handling
and safe_ioctl macro for safe ioctl system calls. These are required
dependencies for the ioctl emulation subsystem.
Signed-off-by: Stacey D. Son
Signed-off-by: Warner Losh
---
bsd-user/syscall_defs.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/bsd-user/syscall_defs.h b/bsd-user/syscall_defs.h
index 4dbd90c2f1..873aea2fdd 100644
--- a/bsd-user/syscall_defs.h
+++ b/bsd-user/syscall_defs.h
@@ -565,6 +565,16 @@ type safe_##name(type1 arg1, type2 arg2, type3 arg3, type4
arg4, \
return safe_syscall(SYS_##name, arg1, arg2, arg3, arg4, arg5, arg6); \
}
+/*
+ * sys/socket.h
+ */
+struct target_sockaddr {
+uint8_t sa_len;
+uint8_t sa_family;
+uint8_t sa_data[14];
+} QEMU_PACKED;
+
+#define safe_ioctl(...) safe_syscall(SYS_ioctl, __VA_ARGS__)
#define safe_fcntl(...) safe_syscall(SYS_fcntl, __VA_ARGS__)
/* So far all target and host bitmasks are the same */
--
2.52.0