summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2015-02-11 16:57:28 (GMT)
committerAndreas Schneider <asn@cryptomilk.org>2015-02-11 16:57:56 (GMT)
commit8794c46a0094eea70cc2122ffeebf00e8ed926f4 (patch)
treea812d147fb99b72476f437dd8149c425dc53f2c0
parent237819afda29accc5e1e98ba3fbed6fee29d5ca9 (diff)
downloadcmocka-8794c46a0094eea70cc2122ffeebf00e8ed926f4.zip
cmocka-8794c46a0094eea70cc2122ffeebf00e8ed926f4.tar.gz
cmocka-8794c46a0094eea70cc2122ffeebf00e8ed926f4.tar.bz2
tests: Fix building the tests with Visual Studio.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--include/cmocka_private.h1
-rw-r--r--tests/test_alloc.c3
-rw-r--r--tests/test_assert_macros.c5
3 files changed, 9 insertions, 0 deletions
diff --git a/include/cmocka_private.h b/include/cmocka_private.h
index 1e40c2c..7479d79 100644
--- a/include/cmocka_private.h
+++ b/include/cmocka_private.h
@@ -23,6 +23,7 @@
#include <windows.h>
# ifdef _MSC_VER
+# include <stdio.h> /* _snprintf */
# undef inline
# define inline __inline
diff --git a/tests/test_alloc.c b/tests/test_alloc.c
index 6008499..e1642af 100644
--- a/tests/test_alloc.c
+++ b/tests/test_alloc.c
@@ -1,6 +1,9 @@
+#include "config.h"
+
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
+#include <cmocka_private.h>
#include <cmocka.h>
#include <stdlib.h>
diff --git a/tests/test_assert_macros.c b/tests/test_assert_macros.c
index 2906517..8e0ebb1 100644
--- a/tests/test_assert_macros.c
+++ b/tests/test_assert_macros.c
@@ -1,12 +1,17 @@
+#include "config.h"
+
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
+#include <cmocka_private.h>
#include <cmocka.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <fcntl.h>
/**************************************