diff --git a/include/icmp.h b/include/icmp.h index 4523bd7..eb025c5 100644 --- a/include/icmp.h +++ b/include/icmp.h @@ -30,9 +30,17 @@ #ifndef TINS_ICMP_H #define TINS_ICMP_H -#ifdef TIMESTAMP_REQUEST - #undef TIMESTAMP_REQUEST -#endif // TIMESTAMP_REQUEST +// Windows likes to define macros with not-so-common-names, which break +// this code +#ifdef WIN32 + #ifdef TIMESTAMP_REQUEST + #undef TIMESTAMP_REQUEST + #endif // TIMESTAMP_REQUEST + + #ifdef TIMESTAMP_REPLY + #undef TIMESTAMP_REPLY + #endif // TIMESTAMP_REPLY +#endif // WIN32 #include "macros.h" #include "pdu.h" diff --git a/src/icmp.cpp b/src/icmp.cpp index 18b182c..44a3d95 100644 --- a/src/icmp.cpp +++ b/src/icmp.cpp @@ -35,10 +35,10 @@ #ifndef WIN32 #include #endif -#include "icmp.h" #include "rawpdu.h" #include "utils.h" #include "exceptions.h" +#include "icmp.h" namespace Tins { ICMP::ICMP(Flags flag)