summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
Diffstat (limited to 'external')
-rw-r--r--external/hunspell/UnpackedTarball_hunspell.mk1
-rw-r--r--external/hunspell/bit_cast.patch.022
2 files changed, 23 insertions, 0 deletions
diff --git a/external/hunspell/UnpackedTarball_hunspell.mk b/external/hunspell/UnpackedTarball_hunspell.mk
index 9da05b966b4e..9075d98659e7 100644
--- a/external/hunspell/UnpackedTarball_hunspell.mk
+++ b/external/hunspell/UnpackedTarball_hunspell.mk
@@ -25,6 +25,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,hunspell, \
external/hunspell/0001-fix-LibreOffice-build-problem-with-basic_string-appe.patch \
external/hunspell/0001-Resolves-rhbz-2158548-allow-longer-words-for-hunspel.patch \
external/hunspell/0001-Keep-only-REP-ph-or-2-word-dictionary-phrase-suggest.patch \
+ external/hunspell/bit_cast.patch.0 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/hunspell/bit_cast.patch.0 b/external/hunspell/bit_cast.patch.0
new file mode 100644
index 000000000000..777b9bbfdd8e
--- /dev/null
+++ b/external/hunspell/bit_cast.patch.0
@@ -0,0 +1,22 @@
+--- src/hunspell/w_char.hxx
++++ src/hunspell/w_char.hxx
+@@ -42,9 +42,8 @@
+
+ #if __cplusplus >= 202002L
+ #include <bit>
+-#else
++#endif
+ #include <cstring>
+-#endif
+
+ #ifndef GCC
+ struct w_char {
+@@ -58,7 +57,7 @@
+ {
+ #if defined(__i386__) || defined(_M_IX86) || defined(_M_X64)
+ //use little-endian optimized version
+-#if __cplusplus >= 202002L
++#if __cplusplus >= 202002L && defined __cpp_lib_bit_cast && __cpp_lib_bit_cast >= 201806L
+ return std::bit_cast<unsigned short>(*this);
+ #else
+ unsigned short u;