cmocka: cmocka.h is used by third parties.

simply include stdint.h.
This commit is contained in:
Jerome Duval
2018-09-26 13:36:03 +02:00
parent 27234a78fa
commit e4d7930dea
2 changed files with 20 additions and 59 deletions

View File

@@ -7,7 +7,7 @@ COPYRIGHT="2008 Google Inc.
2014-2018 Andreas Schneider
2015 Jakub Hrozek"
LICENSE="Apache v2"
REVISION="4"
REVISION="5"
SOURCE_URI="https://cmocka.org/files/${portVersion%.*}/cmocka-$portVersion.tar.xz"
CHECKSUM_SHA256="d11cd1e129827ff240a501c1c43557e808de89e8fcd8ab9e963c8db419332bdd"
PATCHES="cmocka-$portVersion.patchset"
@@ -56,8 +56,7 @@ BUILD()
$cmakeDirArgs \
-DINCLUDE_INSTALL_DIR="$includeDir" \
-DLIBEXEC_INSTALL_DIR="$libDir" \
-DLIB_INSTALL_DIR="$libDir" \
-DCMAKE_C_FLAGS="-D_UINTPTR_T"
-DLIB_INSTALL_DIR="$libDir"
make $jobArgs
}

View File

@@ -1,63 +1,25 @@
From 6ebcd43865726887423c69601875ab912e133c72 Mon Sep 17 00:00:00 2001
From 03068c5e137d36dfa35e6f9d3e08cf553883a15c Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 26 Sep 2018 11:19:25 +0200
Subject: [PATCH] include missing stdint.h
Date: Wed, 26 Sep 2018 13:33:44 +0200
Subject: [PATCH] Haiku: include sdint.h to define uintptr_t.
---
example/calculator_test.c | 1 +
example/chef_wrap/waiter_test_wrap.c | 1 +
example/customer_database_test.c | 1 +
example/product_database_test.c | 1 +
4 files changed, 4 insertions(+)
include/cmocka.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/example/calculator_test.c b/example/calculator_test.c
index ab8cad8..655c835 100644
--- a/example/calculator_test.c
+++ b/example/calculator_test.c
@@ -15,6 +15,7 @@
*/
#include <stdarg.h>
#include <stddef.h>
+#include <stdint.h>
#include <setjmp.h>
#include "cmocka.h"
#include <stdio.h>
diff --git a/example/chef_wrap/waiter_test_wrap.c b/example/chef_wrap/waiter_test_wrap.c
index 4146818..1f52111 100644
--- a/example/chef_wrap/waiter_test_wrap.c
+++ b/example/chef_wrap/waiter_test_wrap.c
@@ -23,6 +23,7 @@
diff --git a/include/cmocka.h b/include/cmocka.h
index e6861c8..32a651a 100644
--- a/include/cmocka.h
+++ b/include/cmocka.h
@@ -117,6 +117,8 @@ typedef uintmax_t LargestIntegralType;
typedef unsigned int uintptr_t;
# elif defined(_WIN64)
typedef unsigned long int uintptr_t
+# elif defined(__HAIKU__)
+ #include <stdint.h>
# else /* _WIN32 */
#include <stdarg.h>
#include <stddef.h>
+#include <stdint.h>
#include <setjmp.h>
#include <cmocka.h>
diff --git a/example/customer_database_test.c b/example/customer_database_test.c
index 45ec782..172daca 100644
--- a/example/customer_database_test.c
+++ b/example/customer_database_test.c
@@ -15,6 +15,7 @@
*/
#include <stdarg.h>
#include <stddef.h>
+#include <stdint.h>
#include <setjmp.h>
#include <cmocka.h>
#include <database.h>
diff --git a/example/product_database_test.c b/example/product_database_test.c
index e09eeab..b66450e 100644
--- a/example/product_database_test.c
+++ b/example/product_database_test.c
@@ -15,6 +15,7 @@
*/
#include <stdarg.h>
#include <stddef.h>
+#include <stdint.h>
#include <setjmp.h>
#include <cmocka.h>
#include <database.h>
/* ILP32 and LP64 platforms */
--
2.9.3.windows.1
2.18.0