From: Andreas Färber Date: Mon, 28 May 2012 17:34:20 +0000 (+0200) Subject: slirp: Avoid statements without effect on Big Endian host X-Git-Tag: v2.7.1~5001^2~1 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=9b24d8e987d1249836cd4bccebf7c3a33025b293;p=mirror_qemu.git slirp: Avoid statements without effect on Big Endian host 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 --- diff --git a/slirp/ip.h b/slirp/ip.h index 88c903fccd..e2ee5e304c 100644 --- a/slirp/ip.h +++ b/slirp/ip.h @@ -34,18 +34,14 @@ #define _IP_H_ #ifdef HOST_WORDS_BIGENDIAN -# ifndef NTOHL -# define NTOHL(d) -# endif -# ifndef NTOHS -# define NTOHS(d) -# endif -# ifndef HTONL -# define HTONL(d) -# endif -# ifndef HTONS -# define HTONS(d) -# endif +# undef NTOHL +# undef NTOHS +# undef HTONL +# undef HTONS +# define NTOHL(d) +# define NTOHS(d) +# define HTONL(d) +# define HTONS(d) #else # ifndef NTOHL # define NTOHL(d) ((d) = ntohl((d)))