diff options
author | Brad King <brad.king@kitware.com> | 2015-10-26 13:04:44 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-10-28 12:44:47 (GMT) |
commit | 1e4738173053450c370f6d558fff6c08e5b084f5 (patch) | |
tree | 77b6ef37ce12e3a1c094cb4fbac3ff7b81d8bc7d | |
parent | 43d577dcb9e29842c91073056ca400963d6bee0e (diff) | |
download | CMake-1e4738173053450c370f6d558fff6c08e5b084f5.zip CMake-1e4738173053450c370f6d558fff6c08e5b084f5.tar.gz CMake-1e4738173053450c370f6d558fff6c08e5b084f5.tar.bz2 |
libarchive: Do not use pthread.h API without header
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_random.c | 3 |
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 |