You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.2 KiB

  1. commit f81e5b71ce78f33250347914dacc75c8463bf102
  2. Author: Breno Leitao <breno.leitao@gmail.com>
  3. Date: Wed Mar 29 15:22:38 2017 -0300
  4. include: Check for previous declaration of uintptr_t
  5. Adding a extra check before declaring uintptr_t. Currently musl uses
  6. macro __DEFINED_uintptr_t once it defines uintptr_t type. Checking
  7. this macro before defining it, and, defining it when uintptr_t is
  8. defined.
  9. Signed-off-by: Breno Leitao <breno.leitao@gmail.com>
  10. --- a/third_party/cmocka/cmocka.h
  11. +++ b/third_party/cmocka/cmocka.h
  12. @@ -111,7 +111,7 @@ typedef uintmax_t LargestIntegralType;
  13. ((LargestIntegralType)(value))
  14. /* Smallest integral type capable of holding a pointer. */
  15. -#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED)
  16. +#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED) && !defined(__DEFINED_uintptr_t)
  17. # if defined(_WIN32)
  18. /* WIN32 is an ILP32 platform */
  19. typedef unsigned int uintptr_t;
  20. @@ -137,6 +137,8 @@ typedef uintmax_t LargestIntegralType;
  21. # define _UINTPTR_T
  22. # define _UINTPTR_T_DEFINED
  23. +# define __DEFINED_uintptr_t
  24. +
  25. #endif /* !defined(_UINTPTR_T) || !defined(_UINTPTR_T_DEFINED) */
  26. /* Perform an unsigned cast to uintptr_t. */