]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix the open file flags.
authorTim Kientzle <kientzle@gmail.com>
Mon, 29 Dec 2008 02:18:10 +0000 (21:18 -0500)
committerTim Kientzle <kientzle@gmail.com>
Mon, 29 Dec 2008 02:18:10 +0000 (21:18 -0500)
SVN-Revision: 323

libarchive/test/test_read_large.c

index 3830bf57ad8ced7982e3a7164da2bcb2e3336c45..3ad2af35c76d79aecf9b0b340abb495e6f977938 100644 (file)
@@ -77,7 +77,7 @@ DEFINE_TEST(test_read_large)
        assertA(0 == archive_read_support_compression_all(a));
        assertA(0 == archive_read_open_memory(a, buff, sizeof(buff)));
        assertA(0 == archive_read_next_header(a, &entry));
-       assert(0 < (tmpfilefd = mkstemp(tmpfilename)));
+       assert(0 < (tmpfilefd = open(tmpfilename, O_WRONLY | O_CREAT | O_BINARY, 0755)));
        assertA(0 == archive_read_data_into_fd(a, tmpfilefd));
        close(tmpfilefd);
 #if ARCHIVE_VERSION_NUMBER < 2000000