Skip to content

Commit fedb009

Browse files
committed
interpreter: add macos compat for htole32 and htole64
1 parent f17973c commit fedb009

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/script/interpreter.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ extern "C" {
1616
#include <simplicity/elements/exec.h>
1717
#include <simplicity/errorCodes.h>
1818
}
19+
// ELEMENTS: Macos compat for htole32 and htole64
20+
#if defined(__APPLE__)
21+
#include <libkern/OSByteOrder.h>
22+
#define htole32(x) OSSwapHostToLittleInt32(x)
23+
#define htole64(x) OSSwapHostToLittleInt64(x)
24+
#endif
1925

2026
typedef std::vector<unsigned char> valtype;
2127

0 commit comments

Comments
 (0)