qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-1.1?] slirp: Avoid redefining MAX_TCPOPTLEN


From: Jan Kiszka
Subject: Re: [Qemu-devel] [PATCH for-1.1?] slirp: Avoid redefining MAX_TCPOPTLEN
Date: Mon, 28 May 2012 08:40:08 -0300
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

On 2012-05-27 14:02, Andreas Färber wrote:
> MAX_TCPOPTLEN is being defined as 32. Darwin has it as 40, causing a
> warning. The value is only used to declare an array, into which currently
> 4 bytes are written at most. It should therefore be acceptable to adopt
> the host's definition.
> 
> Therefore only define MAX_TCPOPTLEN if not already defined.
> 
> Signed-off-by: Andreas Färber <address@hidden>
> ---
>  slirp/tcp_output.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/slirp/tcp_output.c b/slirp/tcp_output.c
> index 779314b..9815123 100644
> --- a/slirp/tcp_output.c
> +++ b/slirp/tcp_output.c
> @@ -47,7 +47,9 @@ static const u_char  tcp_outflags[TCP_NSTATES] = {
>  };
>  
>  
> +#ifndef MAX_TCPOPTLEN
>  #define MAX_TCPOPTLEN        32      /* max # bytes that go in options */
> +#endif
>  
>  /*
>   * Tcp output routine: figure out what should be sent and send it.

Let's be conservative for 1.1 and do #undef MAX_TCPOPTLEN instead. Does
this work as well?

Jan

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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