Fix endian.h not available on Windows by defining htole16 no-op

This commit is contained in:
Ryan Volz
2023-07-21 12:34:24 -04:00
committed by Bastian Bloessl
parent 1b88193094
commit 965e2d474f
+2
View File
@@ -24,6 +24,8 @@
#if defined(__APPLE__) #if defined(__APPLE__)
#include <architecture/byte_order.h> #include <architecture/byte_order.h>
#define htole16(x) OSSwapHostToLittleInt16(x) #define htole16(x) OSSwapHostToLittleInt16(x)
#elif defined(_WIN32)
#define htole16(x) (x)
#else #else
#include <endian.h> #include <endian.h>
#endif #endif