qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-1.1?] slirp: Avoid redefining MAX_TCPOPTLEN
@ 2012-05-27 17:02 Andreas Färber
  2012-05-28  6:49 ` Paolo Bonzini
  2012-05-28 11:40 ` Jan Kiszka
  0 siblings, 2 replies; 5+ messages in thread
From: Andreas Färber @ 2012-05-27 17:02 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Andreas Färber, Jan Kiszka

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.faerber@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.
-- 
1.7.5.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-28 14:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-27 17:02 [Qemu-devel] [PATCH for-1.1?] slirp: Avoid redefining MAX_TCPOPTLEN Andreas Färber
2012-05-28  6:49 ` Paolo Bonzini
2012-05-28  7:00   ` Stefan Weil
2012-05-28 11:40 ` Jan Kiszka
2012-05-28 14:45   ` Andreas Färber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).