From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYtm8-0006A9-LY for qemu-devel@nongnu.org; Mon, 28 May 2012 02:49:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SYtm7-0001b1-0s for qemu-devel@nongnu.org; Mon, 28 May 2012 02:49:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYtm6-0001ae-PU for qemu-devel@nongnu.org; Mon, 28 May 2012 02:49:54 -0400 Message-ID: <4FC3200E.8040005@redhat.com> Date: Mon, 28 May 2012 08:49:50 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1338138128-53411-1-git-send-email-andreas.faerber@web.de> In-Reply-To: <1338138128-53411-1-git-send-email-andreas.faerber@web.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH for-1.1?] slirp: Avoid redefining MAX_TCPOPTLEN List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= Cc: "Jan Kiszka (maintainer:SLIRP)" , qemu-devel@nongnu.org Il 27/05/2012 19:02, Andreas F=C3=A4rber ha scritto: > 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 current= ly > 4 bytes are written at most. It should therefore be acceptable to adopt > the host's definition. >=20 > Therefore only define MAX_TCPOPTLEN if not already defined. >=20 > Signed-off-by: Andreas F=C3=A4rber > --- > slirp/tcp_output.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) >=20 > 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] =3D { > }; > =20 > =20 > +#ifndef MAX_TCPOPTLEN > #define MAX_TCPOPTLEN 32 /* max # bytes that go in options */ > +#endif > =20 > /* > * Tcp output routine: figure out what should be sent and send it. Reviewed-by: Paolo Bonzini Paolo