Il 27/05/2012 19:02, Andreas Färber 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 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 <andreas.faer...@web.de> > --- > 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.
Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Paolo