$OpenBSD: patch-include_cmocka_h,v 1.6 2015/12/28 00:34:39 jca Exp $

Avoid a conflicting typedef on 32-bit arch.

--- include/cmocka.h.orig	Sun Mar  1 09:31:52 2015
+++ include/cmocka.h	Sat Nov  7 20:04:06 2015
@@ -56,7 +56,7 @@ int __stdcall IsDebuggerPresent();
 
 /* If __WORDSIZE is not set, try to figure it out and default to 32 bit. */
 #ifndef __WORDSIZE
-# if defined(__x86_64__) && !defined(__ILP32__)
+# if defined(_LP64)
 #  define __WORDSIZE 64
 # else
 #  define __WORDSIZE 32
@@ -96,6 +96,9 @@ typedef uintmax_t LargestIntegralType;
 #define cast_to_largest_integral_type(value) \
     ((LargestIntegralType)(value))
 
+#if defined(__OpenBSD__)
+#include <stdint.h>
+#else
 /* Smallest integral type capable of holding a pointer. */
 #if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED)
 # if defined(_WIN32)
@@ -124,6 +127,7 @@ typedef uintmax_t LargestIntegralType;
 # define _UINTPTR_T
 # define _UINTPTR_T_DEFINED
 #endif /* !defined(_UINTPTR_T) || !defined(_UINTPTR_T_DEFINED) */
+#endif
 
 /* Perform an unsigned cast to uintptr_t. */
 #define cast_to_pointer_integral_type(value) \
