diff options
author | Timo Teräs <timo.teras@iki.fi> | 2017-07-12 09:56:44 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2017-07-12 09:58:40 +0000 |
commit | 045fc2eacbc07040bed00a1baee22f5c1f5250b9 (patch) | |
tree | 2218dcb719cafc8febe7810d3fc678e627eadf41 /main/cmocka/wordsize.patch | |
parent | 225ac308672fe0f00ce52d39a6fa3f6d353aaf72 (diff) | |
download | aports-045fc2eacbc07040bed00a1baee22f5c1f5250b9.tar.bz2 aports-045fc2eacbc07040bed00a1baee22f5c1f5250b9.tar.xz |
main/cmocka: fix wordsize detection universally on musl, enable aarch64
Diffstat (limited to 'main/cmocka/wordsize.patch')
-rw-r--r-- | main/cmocka/wordsize.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/main/cmocka/wordsize.patch b/main/cmocka/wordsize.patch new file mode 100644 index 0000000000..bd514018ba --- /dev/null +++ b/main/cmocka/wordsize.patch @@ -0,0 +1,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 |