]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Minor compile fixes.
authorTim Kientzle <kientzle@gmail.com>
Mon, 27 Jul 2009 04:09:31 +0000 (00:09 -0400)
committerTim Kientzle <kientzle@gmail.com>
Mon, 27 Jul 2009 04:09:31 +0000 (00:09 -0400)
SVN-Revision: 1288

libarchive/test/main.c
libarchive/test/test_fuzz.c

index 764b91de74f9167f3f191fb6a3d82e3becd19d64..8087710027879041a6827697eb4b0064eadf4bd6 100644 (file)
@@ -50,6 +50,7 @@
 #define S_ISREG(m)  ((m) & _S_IFREG)
 #endif
 #define access _access
+#define chdir _chdir
 #ifndef fileno
 #define fileno _fileno
 #endif
@@ -1082,15 +1083,16 @@ test_assert_make_hardlink(const char *file, int line,
 
 int
 test_assert_make_symlink(const char *file, int line,
-                                                 const char *newpath, const char *linkto)
+    const char *newpath, const char *linkto)
 {
        int succeeded;
 
-       count_assertion(file, line);
 #if defined(_WIN32) && !defined(__CYGWIN__)
        int targetIsDir = 0; /* TODO: Fix this. */
+       count_assertion(file, line);
        succeeded = CreateSymbolicLink(newpath, linkto, targetIsDir);
 #else
+       count_assertion(file, line);
        succeeded = !symlink(linkto, newpath);
 #endif
        if (succeeded) {
index ce9c3982cb0b7fffa608d0e51c6e45ad45626940..bd34dcb3257fa14428ea5808435f73f6dfc6dc09 100644 (file)
@@ -86,7 +86,7 @@ DEFINE_TEST(test_fuzz)
                assert(rawimage != NULL);
                image = malloc(size);
                assert(image != NULL);
-               srand(time(NULL));
+               srand((unsigned)time(NULL));
 
                for (i = 0; i < 100; ++i) {
                        FILE *f;