summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-10-26 13:04:44 (GMT)
committerBrad King <brad.king@kitware.com>2015-10-28 12:44:47 (GMT)
commit1e4738173053450c370f6d558fff6c08e5b084f5 (patch)
tree77b6ef37ce12e3a1c094cb4fbac3ff7b81d8bc7d /Utilities/cmlibarchive
parent43d577dcb9e29842c91073056ca400963d6bee0e (diff)
downloadCMake-1e4738173053450c370f6d558fff6c08e5b084f5.zip
CMake-1e4738173053450c370f6d558fff6c08e5b084f5.tar.gz
CMake-1e4738173053450c370f6d558fff6c08e5b084f5.tar.bz2
libarchive: Do not use pthread.h API without header
Diffstat (limited to 'Utilities/cmlibarchive')
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_random.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_random.c b/Utilities/cmlibarchive/libarchive/archive_random.c
index f4d4254..a20b9b1 100644
--- a/Utilities/cmlibarchive/libarchive/archive_random.c
+++ b/Utilities/cmlibarchive/libarchive/archive_random.c
@@ -142,11 +142,10 @@ struct arc4_stream {
uint8_t s[256];
};
-static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER;
-
#define RANDOMDEV "/dev/urandom"
#define KEYSIZE 128
#ifdef HAVE_PTHREAD_H
+static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER;
#define _ARC4_LOCK() pthread_mutex_lock(&arc4random_mtx);
#define _ARC4_UNLOCK() pthread_mutex_unlock(&arc4random_mtx);
#else