summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive/libarchive/archive_random.c
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_random.c')
-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