Skip to content

Commit

Permalink
Fix tests build on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatuska committed Sep 13, 2024
1 parent ef192c2 commit 0025537
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions test_utils/test_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);

Expand Down
5 changes: 4 additions & 1 deletion test_utils/test_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 0025537

Please sign in to comment.