void-packages/srcpkgs/cmocka/patches/wordsize.patch

19 lines
400 B
Diff

--- include/cmocka.h
+++ include/cmocka.h
@@ -56,12 +56,16 @@ int __stdcall IsDebuggerPresent();
/* If __WORDSIZE is not set, try to figure it out and default to 32 bit. */
#ifndef __WORDSIZE
+#ifndef __GLIBC__
+#include <bits/reg.h>
+#else
# if defined(__x86_64__) && !defined(__ILP32__)
# define __WORDSIZE 64
# else
# define __WORDSIZE 32
# endif
#endif
+#endif
#ifdef DOXYGEN
/**