diff --git a/test_utils/test_common.h b/test_utils/test_common.h index 0f93b55e2..b57e79d10 100644 --- a/test_utils/test_common.h +++ b/test_utils/test_common.h @@ -313,6 +313,10 @@ int assertion_non_empty_file(const char *, int, const char *); int assertion_set_nodump(const char *, int, const char *); int assertion_text_file_contents(const char *, int, const char *buff, const char *f); int assertion_umask(const char *, int, int); + +#if !defined(_WIN32) || defined(__CYGWIN__) +typedef long suseconds_t; +#endif int assertion_utimes(const char *, int, const char *, time_t, suseconds_t, time_t, suseconds_t); int assertion_version(const char*, int, const char *, const char *); diff --git a/test_utils/test_main.c b/test_utils/test_main.c index eb6360e12..7d2c9d74d 100644 --- a/test_utils/test_main.c +++ b/test_utils/test_main.c @@ -2090,7 +2090,6 @@ assertion_umask(const char *file, int line, int mask) umask(mask); return (1); } - /* Set times, report failures. */ int assertion_utimes(const char *file, int line, const char *pathname, @@ -3885,7 +3884,11 @@ int main(int argc, char **argv) { static const int limit = sizeof(tests) / sizeof(tests[0]); +#if _MSC_VER + int test_set[sizeof(tests) / sizeof(tests[0])]; +#else int test_set[limit]; +#endif int i = 0, j = 0, tests_run = 0, tests_failed = 0, option; size_t testprogdir_len; size_t tmplen;