forked from fcitx/flatpak-fcitx5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcmath-include.patch
38 lines (36 loc) · 1.3 KB
/
cmath-include.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From 57cffcd02ac70148e21ce982be834876b3df87db Mon Sep 17 00:00:00 2001
From: HanatoK <summersnow9403@gmail.com>
Date: Sat, 1 May 2021 01:04:38 -0500
Subject: [PATCH] Fix FTBFS.
Previous boost library (1.75) may implicitly include cmath, but the
latest version (1.76) does not, so the calls to exp are undefined. This
commit include cmath in script_translator.cc and table_translator.cc to
fix the issue (#462).
---
src/rime/gear/script_translator.cc | 1 +
src/rime/gear/table_translator.cc | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/rime/gear/script_translator.cc b/src/rime/gear/script_translator.cc
index 4a45f05e6..250616593 100644
--- a/src/rime/gear/script_translator.cc
+++ b/src/rime/gear/script_translator.cc
@@ -8,6 +8,7 @@
//
#include <algorithm>
#include <stack>
+#include <cmath>
#include <boost/algorithm/string/join.hpp>
#include <boost/range/adaptor/reversed.hpp>
#include <rime/composition.h>
diff --git a/src/rime/gear/table_translator.cc b/src/rime/gear/table_translator.cc
index 162ac0244..c95e5e24b 100644
--- a/src/rime/gear/table_translator.cc
+++ b/src/rime/gear/table_translator.cc
@@ -6,6 +6,7 @@
//
#include <boost/algorithm/string.hpp>
#include <boost/range/adaptor/reversed.hpp>
+#include <cmath>
#include <utf8.h>
#include <rime/candidate.h>
#include <rime/common.h>