summaryrefslogtreecommitdiff
path: root/devel/cmocka/patches/patch-include_cmocka.h
blob: 8bd7719b3da34635a642a6f0c571f2db0ded7cc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$NetBSD: patch-include_cmocka.h,v 1.1 2018/02/02 10:31:07 jperkin Exp $

C99 fix.

--- include/cmocka.h.orig	2015-03-25 16:04:39.000000000 +0000
+++ include/cmocka.h
@@ -100,6 +100,11 @@ typedef uintmax_t LargestIntegralType;
     ((LargestIntegralType)(value))
 
 /* Smallest integral type capable of holding a pointer. */
+#if (__STDC_VERSION__ - 0 >= 199901L) && !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED)
+# include <stdint.h>
+# define _UINTPTR_T
+# define _UINTPTR_T_DEFINED
+#endif
 #if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED)
 # if defined(_WIN32)
     /* WIN32 is an ILP32 platform */