From: Eric Haszlakiewicz Date: Sun, 24 Nov 2019 04:14:24 +0000 (-0500) Subject: Fix up the test_util_file test for builds on Windows VS2015. X-Git-Tag: json-c-0.14-20200419~75 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b99be9cf4e645c474f6c53aa9363cc7af4fdb7af;p=thirdparty%2Fjson-c.git Fix up the test_util_file test for builds on Windows VS2015. --- diff --git a/tests/test_util_file.c b/tests/test_util_file.c index d4145478..65be9b93 100644 --- a/tests/test_util_file.c +++ b/tests/test_util_file.c @@ -1,5 +1,10 @@ #include "strerror_override.h" #include "strerror_override_private.h" +#ifdef WIN32 +#define WIN32_LEAN_AND_MEAN +#include +#include +#endif /* defined(WIN32) */ #include #include #include @@ -23,6 +28,10 @@ static void test_read_closed(void); static void test_write_to_file(); static void stat_and_cat(const char *file); +#ifndef PATH_MAX +#define PATH_MAX 256 +#endif + static void test_write_to_file() { json_object *jso;