Skip to content

Commit 31a824c

Browse files
committed
Fix tests build on Windows
1 parent ef192c2 commit 31a824c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

test_utils/test_common.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,12 @@ int assertion_non_empty_file(const char *, int, const char *);
313313
int assertion_set_nodump(const char *, int, const char *);
314314
int assertion_text_file_contents(const char *, int, const char *buff, const char *f);
315315
int assertion_umask(const char *, int, int);
316+
317+
#if !defined(_WIN32) || defined(__CYGWIN__)
316318
int assertion_utimes(const char *, int, const char *, time_t, suseconds_t, time_t, suseconds_t);
319+
#else
320+
int assertion_utimes(const char *, int, const char *, time_t, long, time_t, long);
321+
#endif
317322
int assertion_version(const char*, int, const char *, const char *);
318323

319324
void skipping_setup(const char *, int);

test_utils/test_main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3885,7 +3885,11 @@ int
38853885
main(int argc, char **argv)
38863886
{
38873887
static const int limit = sizeof(tests) / sizeof(tests[0]);
3888+
#if _MSC_VER
3889+
int test_set[sizeof(tests) / sizeof(tests[0])];
3890+
#else
38883891
int test_set[limit];
3892+
#endif
38893893
int i = 0, j = 0, tests_run = 0, tests_failed = 0, option;
38903894
size_t testprogdir_len;
38913895
size_t tmplen;

0 commit comments

Comments
 (0)