From 031f2eef88e6678aa3c6b9bdaf3f1aca9a2bf424 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Mon, 27 Jul 2009 00:09:31 -0400 Subject: [PATCH] Minor compile fixes. SVN-Revision: 1288 --- libarchive/test/main.c | 6 ++++-- libarchive/test/test_fuzz.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libarchive/test/main.c b/libarchive/test/main.c index 764b91de7..808771002 100644 --- a/libarchive/test/main.c +++ b/libarchive/test/main.c @@ -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) { diff --git a/libarchive/test/test_fuzz.c b/libarchive/test/test_fuzz.c index ce9c3982c..bd34dcb32 100644 --- a/libarchive/test/test_fuzz.c +++ b/libarchive/test/test_fuzz.c @@ -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; -- 2.47.3