diff --git a/generator/CPP11/include_v2.0/msgmap.hpp b/generator/CPP11/include_v2.0/msgmap.hpp index a3956aa20..b4787b84a 100644 --- a/generator/CPP11/include_v2.0/msgmap.hpp +++ b/generator/CPP11/include_v2.0/msgmap.hpp @@ -6,6 +6,13 @@ #include #elif __APPLE__ #include +#include +#define htole16(x) OSSwapHostToLittleInt16(x) +#define le16toh(x) OSSwapLittleToHostInt16(x) +#define htole32(x) OSSwapHostToLittleInt32(x) +#define le32toh(x) OSSwapLittleToHostInt32(x) +#define htole64(x) OSSwapHostToLittleInt64(x) +#define le64toh(x) OSSwapLittleToHostInt64(x) #else #include #endif