summaryrefslogtreecommitdiff
path: root/external/libtommath/clang-cl.patch
blob: 1cc92d380c62cd21abfd82b165fc3c6c81b111e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- tommath.h
+++ tommath.h
@@ -15,6 +15,13 @@
 #ifndef BN_H_
 #define BN_H_
 
+// Work around clang-cl issue when mp_word is a typedef for unsigned __int128, see
+// <https://bugs.llvm.org/show_bug.cgi?id=25305> "Clang-cl generates a call to an undefined symbol
+// _udivti3":
+#if defined _WIN32 && defined __clang__
+#define MP_8BIT
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>