Skip to content

Commit

Permalink
Fix tests build on Windows (define suseconds_t)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatuska committed Sep 13, 2024
1 parent ef192c2 commit 3f0989f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test_utils/test_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@

#include "archive_platform_xattr.h"

#ifndef suseconds_t
typedef long suseconds_t;
#endif

/*
* Redefine DEFINE_TEST for use in defining the test functions.
*/
Expand Down Expand Up @@ -313,7 +317,12 @@ 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__)
int assertion_utimes(const char *, int, const char *, time_t, suseconds_t, time_t, suseconds_t);
#else
int assertion_utimes(const char *, int, const char *, time_t, long, time_t, long);
#endif
int assertion_version(const char*, int, const char *, const char *);

void skipping_setup(const char *, int);
Expand Down

0 comments on commit 3f0989f

Please sign in to comment.