diff --git a/srcpkgs/cmocka/patches/musl_uintptr.patch b/srcpkgs/cmocka/patches/musl_uintptr.patch new file mode 100644 index 00000000000..6046cd4cd96 --- /dev/null +++ b/srcpkgs/cmocka/patches/musl_uintptr.patch @@ -0,0 +1,34 @@ +commit f81e5b71ce78f33250347914dacc75c8463bf102 +Author: Breno Leitao +Date: Wed Mar 29 15:22:38 2017 -0300 + + include: Check for previous declaration of uintptr_t + + Adding a extra check before declaring uintptr_t. Currently musl uses + macro __DEFINED_uintptr_t once it defines uintptr_t type. Checking + this macro before defining it, and, defining it when uintptr_t is + defined. + + Signed-off-by: Breno Leitao + +--- include/cmocka.h ++++ include/cmocka.h +@@ -110,7 +110,7 @@ + ((LargestIntegralType)(value)) + + /* Smallest integral type capable of holding a pointer. */ +-#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED) ++#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED) && !defined(__DEFINED_uintptr_t) + # if defined(_WIN32) + /* WIN32 is an ILP32 platform */ + typedef unsigned int uintptr_t; +@@ -136,6 +136,8 @@ + + # define _UINTPTR_T + # define _UINTPTR_T_DEFINED ++# define __DEFINED_uintptr_t ++ + #endif /* !defined(_UINTPTR_T) || !defined(_UINTPTR_T_DEFINED) */ + + /* Perform an unsigned cast to uintptr_t. */ + diff --git a/srcpkgs/cmocka/patches/wordsize.patch b/srcpkgs/cmocka/patches/wordsize.patch new file mode 100644 index 00000000000..33beb0488d5 --- /dev/null +++ b/srcpkgs/cmocka/patches/wordsize.patch @@ -0,0 +1,19 @@ +--- 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 ++#else + # if defined(__x86_64__) && !defined(__ILP32__) + # define __WORDSIZE 64 + # else + # define __WORDSIZE 32 + # endif + #endif ++#endif + + #ifdef DOXYGEN + /** diff --git a/srcpkgs/cmocka/template b/srcpkgs/cmocka/template index 2f12e4b1345..fc342f37e6f 100644 --- a/srcpkgs/cmocka/template +++ b/srcpkgs/cmocka/template @@ -1,7 +1,7 @@ # Template file for 'cmocka' pkgname=cmocka version=1.1.1 -revision=1 +revision=2 build_style=cmake configure_args="-DUNIT_TESTING=ON" hostmakedepends="doxygen" @@ -12,10 +12,6 @@ homepage="https://cmocka.org/" distfiles="https://cmocka.org/files/${version%.*}/cmocka-${version}.tar.xz" checksum=f02ef48a7039aa77191d525c5b1aee3f13286b77a13615d11bc1148753fc0389 -case "$XBPS_TARGET_MACHINE" in - aarch64*) broken="conflicting definitions of uinptr_t" -esac - cmocka-devel_package() { depends="cmocka-${version}_${revision}" short_desc+=" - development files"