qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/3] linux-user: fix TARGET_SO_LINGER for sparc


From: Laurent Vivier
Subject: Re: [Qemu-devel] [PATCH 1/3] linux-user: fix TARGET_SO_LINGER for sparc
Date: Wed, 20 Sep 2017 10:26:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

Le 20/09/2017 à 01:06, Carlo Marcelo Arenas Belón a écrit :
> Signed-off-by: Carlo Marcelo Arenas Belón <address@hidden>
> ---
>  linux-user/socket.h | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/linux-user/socket.h b/linux-user/socket.h
> index 7051cd2cf4..129f9b4713 100644
> --- a/linux-user/socket.h
> +++ b/linux-user/socket.h
> @@ -246,8 +246,12 @@
>      #define TARGET_SOCK_MAX (TARGET_SOCK_PACKET + 1)
>      #define TARGET_SOCK_TYPE_MASK    0xf  /* Covers up to TARGET_SOCK_MAX-1. 
> */
>  
> +    #define TARGET_SO_LINGER         0x0080
> +
>      #define TARGET_SO_PASSSEC        31
>  #else
> +    #define TARGET_SO_LINGER         13
> +
>      #define TARGET_SO_PASSSEC        34
>  #endif


The change is correct but it should be added below, in the "For
setsockopt(2)" section, adding a TARGET_SPARC section, like we have a
TARGET_PPC section.

>  
> @@ -268,7 +272,7 @@
>      #define TARGET_SO_OOBINLINE    10
>      #define TARGET_SO_NO_CHECK     11
>      #define TARGET_SO_PRIORITY     12
> -    #define TARGET_SO_LINGER       13
> +

Don't add a blank line

>      #define TARGET_SO_BSDCOMPAT    14
>      /* To add :#define TARGET_SO_REUSEPORT 15 */
>  #if defined(TARGET_PPC)
> 

But a better change would be to move all socket defines to a new file
linux-user/sparc/sockbits.h (like for TARGET_HPPA).

Laurent



reply via email to

[Prev in Thread] Current Thread [Next in Thread]