]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
test_write_format_gnutar_filenames: use AE_IFLNK instead of S_IFLNK 779/head
authorIgnacio Casal Quinteiro <icq@gnome.org>
Thu, 8 Sep 2016 12:53:18 +0000 (14:53 +0200)
committerIgnacio Casal Quinteiro <icq@gnome.org>
Thu, 8 Sep 2016 16:18:13 +0000 (18:18 +0200)
Since S_IFLNK will fail on windows.

https://github.com/libarchive/libarchive/issues/769

libarchive/test/test_write_format_gnutar_filenames.c

index 26457d3575008af713631b209870b464d382b4db..655e998ed827d567416b960d356838ea6c9224d4 100644 (file)
@@ -100,6 +100,10 @@ DEFINE_TEST(test_write_format_gnutar_linknames)
        size_t used;
        int i;
 
+#ifdef S_IFLNK
+       assertEqualInt(S_IFLNK, AE_IFLNK);
+#endif
+
        buff = malloc(buffsize); /* million bytes of work area */
        assert(buff != NULL);
 
@@ -109,7 +113,7 @@ DEFINE_TEST(test_write_format_gnutar_linknames)
        archive_entry_set_birthtime(template, 3, 30);
        archive_entry_set_ctime(template, 4, 40);
        archive_entry_set_mtime(template, 5, 50);
-       archive_entry_set_mode(template, S_IFLNK | 0755);
+       archive_entry_set_mode(template, AE_IFLNK | 0755);
        archive_entry_copy_pathname(template, "link");
 
        for (i = 0; i < 2000; ++i) {