diff --git a/src/util-inl.h b/src/util-inl.h index 99d470205e1ce7..1abebf6e1374e8 100644 --- a/src/util-inl.h +++ b/src/util-inl.h @@ -27,6 +27,18 @@ #include #include "util.h" +// These are defined by or on some systems. +// To avoid warnings, undefine them before redefining them. +#ifdef BSWAP_2 +# undef BSWAP_2 +#endif +#ifdef BSWAP_4 +# undef BSWAP_4 +#endif +#ifdef BSWAP_8 +# undef BSWAP_8 +#endif + #if defined(_MSC_VER) #include #define BSWAP_2(x) _byteswap_ushort(x)