From 94a7221a5fec2806ca1caf04b671093d6eedde66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 28 May 2012 19:34:20 +0200 Subject: slirp: Avoid statements without effect on Big Endian host MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Darwin has HTON*/NTOH* macros that on BE simply return the argument. This is incompatible with SLIRP's use of these macros as a statement. Undefine the macros in the HOST_WORDS_BIGENDIAN code path to redefine these macros as no-op, as already done when they were undefined. Suggested-by: Peter Maydell Signed-off-by: Andreas Färber Signed-off-by: Jan Kiszka --- ip.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ip.h b/ip.h index c82b521..1680791 100644 --- a/ip.h +++ b/ip.h @@ -34,18 +34,14 @@ #define _IP_H_ #ifdef HOST_WORDS_BIGENDIAN -#ifndef NTOHL +#undef NTOHL +#undef NTOHS +#undef HTONL +#undef HTONS #define NTOHL(d) -#endif -#ifndef NTOHS #define NTOHS(d) -#endif -#ifndef HTONL #define HTONL(d) -#endif -#ifndef HTONS #define HTONS(d) -#endif #else #ifndef NTOHL #define NTOHL(d) ((d) = ntohl((d))) -- cgit v1.1