aboutsummaryrefslogtreecommitdiffstats
path: root/main/cmocka/wordsize.patch
blob: bd514018ba1d56af27a794cc67470c3e50c2f3e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
musl defines __WORDSIZE in bits/reg.h so include that. Also
error out on if it's not defined, otherwise we might get wrong
assumption which causes weird failures.

--- cmocka-1.1.1.orig/include/cmocka.h
+++ cmocka-1.1.1/include/cmocka.h
@@ -55,12 +55,9 @@
  */
 
 /* If __WORDSIZE is not set, try to figure it out and default to 32 bit. */
+#include <bits/reg.h>
 #ifndef __WORDSIZE
-# if defined(__x86_64__) && !defined(__ILP32__)
-#  define __WORDSIZE 64
-# else
-#  define __WORDSIZE 32
-# endif
+#error __WORDSIZE not defined
 #endif
 
 #ifdef DOXYGEN