Skip to content

Commit

Permalink
First round of fixing autotools build on MSYS2-MINGW
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatuska committed Feb 24, 2017
1 parent 5a33ddb commit 429b71b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions libarchive/archive_digest_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\
defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\
defined(ARCHIVE_CRYPTO_SHA512_WIN)
#include <windows.h>
#include <wincrypt.h>
typedef struct {
int valid;
Expand Down
6 changes: 4 additions & 2 deletions libarchive/test/test_read_disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ uname_lookup(void *d, int64_t u)
return ("NOTFOO");
}

#if !defined(__CYGWIN__) && !defined(__HAIKU__)
/* We test GID lookup by looking up the name of group number zero and
* checking it against the following list. If your system uses a
* different conventional name for group number zero, please extend
Expand All @@ -71,13 +72,16 @@ static const char *zero_groups[] = {
"root", /* Linux */
"wheel" /* BSD */
};
#endif

DEFINE_TEST(test_read_disk)
{
struct archive *a;
int gmagic = 0x13579, umagic = 0x1234;
#if !defined(__CYGWIN__) && !defined(__HAIKU__)
const char *p;
size_t i;
#endif

assert((a = archive_read_disk_new()) != NULL);

Expand Down Expand Up @@ -115,8 +119,6 @@ DEFINE_TEST(test_read_disk)
/* Some platforms don't have predictable names for
* uid=0, so we skip this part of the test. */
skipping("standard uname/gname lookup");
i = 0;
p = zero_groups[0]; /* avoid unused warnings */
#else
/* XXX Someday, we may need to generalize this the
* same way we generalized the group name check below.
Expand Down

0 comments on commit 429b71b

Please sign in to comment.