31 lines
681 B
Diff
31 lines
681 B
Diff
From 624091a90e816f555106a1b1f994a45cb4989051 Mon Sep 17 00:00:00 2001
|
|
From: Malcolm Smith <smith@chaquo.com>
|
|
Date: Tue, 12 Jan 2021 13:43:28 +0000
|
|
Subject: [PATCH 5/7] Add missing #include for BYTE_ORDER
|
|
|
|
---
|
|
src/util.h | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
diff --git a/src/util.h b/src/util.h
|
|
index bf8a758..1680f4b 100644
|
|
--- a/src/util.h
|
|
+++ b/src/util.h
|
|
@@ -36,6 +36,13 @@
|
|
#include <pthread.h>
|
|
#endif
|
|
|
|
+#if !defined(__APPLE__) && !defined(_WIN32)
|
|
+#include <endian.h>
|
|
+#if defined(BYTE_ORDER) && defined(__BIG_ENDIAN) && BYTE_ORDER == __BIG_ENDIAN
|
|
+#define IS_BIG_ENDIAN
|
|
+#endif
|
|
+#endif
|
|
+
|
|
namespace sentencepiece {
|
|
|
|
template <typename T>
|
|
--
|
|
2.18.0.huawei.25
|
|
|