From 3bda2ad8bc697dc172967e12775a21a106775a8e Mon Sep 17 00:00:00 2001 From: Masakazu Kitajo Date: Wed, 20 May 2020 09:00:41 +0900 Subject: [PATCH] Add le32toh and htole32 for macOS --- include/tscore/ink_endian.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/tscore/ink_endian.h b/include/tscore/ink_endian.h index c973faec037..539c8354124 100644 --- a/include/tscore/ink_endian.h +++ b/include/tscore/ink_endian.h @@ -60,4 +60,14 @@ htobe32(uint32_t x) { return OSSwapHostToBigInt32(x); } +inline uint32_t +le32toh(uint32_t x) +{ + return OSSwapLittleToHostInt32(x); +} +inline uint32_t +htole32(uint32_t x) +{ + return OSSwapHostToLittleInt32(x); +} #endif