From: Tim Kientzle Date: Mon, 27 Jul 2009 04:09:31 +0000 (-0400) Subject: Minor compile fixes. X-Git-Tag: v2.8.0~495 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=031f2eef88e6678aa3c6b9bdaf3f1aca9a2bf424;p=thirdparty%2Flibarchive.git Minor compile fixes. SVN-Revision: 1288 --- 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;