]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
First round of fixing autotools build on MSYS2-MINGW
authorMartin Matuska <martin@matuska.org>
Fri, 24 Feb 2017 14:47:19 +0000 (15:47 +0100)
committerMartin Matuska <martin@matuska.org>
Fri, 24 Feb 2017 15:01:32 +0000 (16:01 +0100)
libarchive/archive_digest_private.h
libarchive/test/test_read_disk.c

index b58ffb348f60d028404a16fe13b3605506ef8c28..b4fd6ca22527bc55b6eda776cad0496e434286e1 100644 (file)
   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;
index bd36c396a1afef12f1ed56c42c6f76dc7a7170cf..43d7d86bab240444db7311c143ee46bcbf6e955e 100644 (file)
@@ -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.