diff options
author | Andreas Färber <andreas.faerber@web.de> | 2012-05-28 19:34:20 +0200 |
---|---|---|
committer | Jan Kiszka <jan.kiszka@siemens.com> | 2012-05-28 22:31:07 +0200 |
commit | 94a7221a5fec2806ca1caf04b671093d6eedde66 (patch) | |
tree | e9c1fb04fced80b25bd62c932455c73b3cd34095 | |
parent | 72e8d75ab9338a416ee4a003cff0a25be875706a (diff) | |
download | slirp-94a7221a5fec2806ca1caf04b671093d6eedde66.zip slirp-94a7221a5fec2806ca1caf04b671093d6eedde66.tar.gz slirp-94a7221a5fec2806ca1caf04b671093d6eedde66.tar.bz2 |
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 <peter.maydell@linaro.org>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
-rw-r--r-- | ip.h | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -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))) |