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.

35 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. diff --git a/third_party/cmocka/cmocka.h b/third_party/cmocka/cmocka.h
  11. index 303d0ae..a2bfc40 100644
  12. --- a/third_party/cmocka/cmocka.h
  13. +++ b/third_party/cmocka/cmocka.h
  14. @@ -110,7 +110,7 @@
  15. ((LargestIntegralType)(value))
  16. /* Smallest integral type capable of holding a pointer. */
  17. -#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED)
  18. +#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED) && !defined(__DEFINED_uintptr_t)
  19. # if defined(_WIN32)
  20. /* WIN32 is an ILP32 platform */
  21. typedef unsigned int uintptr_t;
  22. @@ -136,6 +136,8 @@
  23. # define _UINTPTR_T
  24. # define _UINTPTR_T_DEFINED
  25. +# define __DEFINED_uintptr_t
  26. +
  27. #endif /* !defined(_UINTPTR_T) || !defined(_UINTPTR_T_DEFINED) */
  28. /* Perform an unsigned cast to uintptr_t. */