From: Martin Matuska Date: Fri, 24 Feb 2017 14:47:19 +0000 (+0100) Subject: First round of fixing autotools build on MSYS2-MINGW X-Git-Tag: v3.3.1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=429b71b92af52d1a65542d7683d713f960d29f54;p=thirdparty%2Flibarchive.git First round of fixing autotools build on MSYS2-MINGW --- diff --git a/libarchive/archive_digest_private.h b/libarchive/archive_digest_private.h index b58ffb348..b4fd6ca22 100644 --- a/libarchive/archive_digest_private.h +++ b/libarchive/archive_digest_private.h @@ -143,6 +143,7 @@ defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ defined(ARCHIVE_CRYPTO_SHA512_WIN) +#include #include typedef struct { int valid; diff --git a/libarchive/test/test_read_disk.c b/libarchive/test/test_read_disk.c index bd36c396a..43d7d86ba 100644 --- a/libarchive/test/test_read_disk.c +++ b/libarchive/test/test_read_disk.c @@ -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 @@ -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); @@ -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.