Le 23/08/2019 à 01:14, Shu-Chun Weng via Qemu-devel a écrit :
> This change supports SO_TIMESTAMPNS and SO_TIMESTAMPING for
> setsocketopt() with SOL_SOCKET.
> 
> The TARGET_SO_TIMESTAMP{NS,ING} constants are already defined for
> alpha, hppa, and sparc. In include/uapi/asm-generic/socket.h:
> 
> In arch/mips/include/uapi/asm/socket.h:
> 
> Signed-off-by: Shu-Chun Weng <s...@google.com>
> ---
>  linux-user/generic/sockbits.h |  4 ++++
>  linux-user/mips/sockbits.h    |  4 ++++
>  linux-user/syscall.c          | 10 ++++++++--
>  3 files changed, 16 insertions(+), 2 deletions(-)
> 
> diff --git a/linux-user/generic/sockbits.h b/linux-user/generic/sockbits.h
> index e44733c601..5cbafdb49b 100644
> --- a/linux-user/generic/sockbits.h
> +++ b/linux-user/generic/sockbits.h
> @@ -51,6 +51,10 @@
>  #define TARGET_SO_PEERNAME             28
>  #define TARGET_SO_TIMESTAMP            29
>  #define TARGET_SCM_TIMESTAMP           TARGET_SO_TIMESTAMP
> +#define TARGET_SO_TIMESTAMPNS          35
> +#define TARGET_SCM_TIMESTAMPNS         TARGET_SO_TIMESTAMPNS
> +#define TARGET_SO_TIMESTAMPING         37
> +#define TARGET_SCM_TIMESTAMPING        TARGET_SO_TIMESTAMPING

We must not rely on TARGET_SO_TIMESTAMP and TARGET_SO_TIMESTAMPNS but on
the _OLD and _NEW versions.

See:

6d5d5dde9adb ("linux-user: fix to handle variably sized SIOCGSTAMP with
new kernels")

So the existing definitions must be removed and the _NEW and _OLD
versions added.

Thanks,
Laurent


Reply via email to