diff options
Diffstat (limited to '')
-rw-r--r-- | crypto/compat/thread_private.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/compat/thread_private.h b/crypto/compat/thread_private.h new file mode 100644 index 0000000..3286a7c --- /dev/null +++ b/crypto/compat/thread_private.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #include <pthread.h> | ||
2 | |||
3 | static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER; | ||
4 | |||
5 | #define _ARC4_LOCK() pthread_mutex_lock(&arc4random_mtx) | ||
6 | #define _ARC4_UNLOCK() pthread_mutex_unlock(&arc4random_mtx) | ||