tests: Fix building the tests with Visual Studio.
authorAndreas Schneider <asn@cryptomilk.org>
Wed, 11 Feb 2015 16:57:28 +0000 (17:57 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 11 Feb 2015 16:57:56 +0000 (17:57 +0100)
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
include/cmocka_private.h
tests/test_alloc.c
tests/test_assert_macros.c

index 1e40c2c..7479d79 100644 (file)
@@ -23,6 +23,7 @@
 #include <windows.h>
 
 # ifdef _MSC_VER
+# include <stdio.h> /* _snprintf */
 
 #  undef inline
 #  define inline __inline
index 6008499..e1642af 100644 (file)
@@ -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>
index 2906517..8e0ebb1 100644 (file)
@@ -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>
 
 /**************************************