From 6d5d5dde9adb5acb32e6b8e3dfbf47fff0f308d2 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrangé" Date: Thu, 18 Jul 2019 15:06:41 +0200 Subject: linux-user: fix to handle variably sized SIOCGSTAMP with new kernels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The SIOCGSTAMP symbol was previously defined in the asm-generic/sockios.h header file. QEMU sees that header indirectly via sys/socket.h In linux kernel commit 0768e17073dc527ccd18ed5f96ce85f9985e9115 the asm-generic/sockios.h header no longer defines SIOCGSTAMP. Instead it provides only SIOCGSTAMP_OLD, which only uses a 32-bit time_t on 32-bit architectures. The linux/sockios.h header then defines SIOCGSTAMP using either SIOCGSTAMP_OLD or SIOCGSTAMP_NEW as appropriate. If SIOCGSTAMP_NEW is used, then the tv_sec field is 64-bit even on 32-bit architectures To cope with this we must now convert the old and new type from the target to the host one. Signed-off-by: Daniel P. Berrangé Signed-off-by: Laurent Vivier Reviewed-by: Arnd Bergmann Message-Id: <20190718130641.15294-1-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- linux-user/syscall_types.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'linux-user/syscall_types.h') diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h index b98a23b0f1..4e36983826 100644 --- a/linux-user/syscall_types.h +++ b/linux-user/syscall_types.h @@ -14,12 +14,6 @@ STRUCT(serial_icounter_struct, STRUCT(sockaddr, TYPE_SHORT, MK_ARRAY(TYPE_CHAR, 14)) -STRUCT(timeval, - MK_ARRAY(TYPE_LONG, 2)) - -STRUCT(timespec, - MK_ARRAY(TYPE_LONG, 2)) - STRUCT(rtentry, TYPE_ULONG, MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), TYPE_SHORT, TYPE_SHORT, TYPE_ULONG, TYPE_PTRVOID, TYPE_SHORT, TYPE_PTRVOID, -- cgit 1.4.1