diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/arc4random/arc4random_linux.h | 8 | ||||
| -rw-r--r-- | src/lib/libcrypto/arc4random/arc4random_osx.h | 8 | ||||
| -rw-r--r-- | src/lib/libcrypto/arc4random/arc4random_solaris.h | 9 | ||||
| -rw-r--r-- | src/lib/libcrypto/crypto/arc4random_linux.h | 8 | ||||
| -rw-r--r-- | src/lib/libcrypto/crypto/arc4random_osx.h | 8 | ||||
| -rw-r--r-- | src/lib/libcrypto/crypto/arc4random_solaris.h | 9 |
6 files changed, 44 insertions, 6 deletions
diff --git a/src/lib/libcrypto/arc4random/arc4random_linux.h b/src/lib/libcrypto/arc4random/arc4random_linux.h index 992ee6bb8e..29dad3b9ad 100644 --- a/src/lib/libcrypto/arc4random/arc4random_linux.h +++ b/src/lib/libcrypto/arc4random/arc4random_linux.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: arc4random_linux.h,v 1.4 2014/07/19 13:02:28 bcook Exp $ */ | 1 | /* $OpenBSD: arc4random_linux.h,v 1.5 2014/07/19 14:34:38 bcook Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> |
| @@ -22,6 +22,12 @@ | |||
| 22 | * Stub functions for portability. | 22 | * Stub functions for portability. |
| 23 | */ | 23 | */ |
| 24 | 24 | ||
| 25 | #include <pthread.h> | ||
| 26 | |||
| 27 | static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER; | ||
| 28 | #define _ARC4_LOCK() pthread_mutex_lock(&arc4random_mtx) | ||
| 29 | #define _ARC4_UNLOCK() pthread_mutex_unlock(&arc4random_mtx) | ||
| 30 | |||
| 25 | static volatile sig_atomic_t _rs_forked; | 31 | static volatile sig_atomic_t _rs_forked; |
| 26 | 32 | ||
| 27 | static inline void | 33 | static inline void |
diff --git a/src/lib/libcrypto/arc4random/arc4random_osx.h b/src/lib/libcrypto/arc4random/arc4random_osx.h index 274288000f..55932bb823 100644 --- a/src/lib/libcrypto/arc4random/arc4random_osx.h +++ b/src/lib/libcrypto/arc4random/arc4random_osx.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: arc4random_osx.h,v 1.4 2014/07/19 13:02:28 bcook Exp $ */ | 1 | /* $OpenBSD: arc4random_osx.h,v 1.5 2014/07/19 14:34:38 bcook Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> |
| @@ -22,6 +22,12 @@ | |||
| 22 | * Stub functions for portability. | 22 | * Stub functions for portability. |
| 23 | */ | 23 | */ |
| 24 | 24 | ||
| 25 | #include <pthread.h> | ||
| 26 | |||
| 27 | static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER; | ||
| 28 | #define _ARC4_LOCK() pthread_mutex_lock(&arc4random_mtx) | ||
| 29 | #define _ARC4_UNLOCK() pthread_mutex_unlock(&arc4random_mtx) | ||
| 30 | |||
| 25 | static volatile sig_atomic_t _rs_forked; | 31 | static volatile sig_atomic_t _rs_forked; |
| 26 | 32 | ||
| 27 | static inline void | 33 | static inline void |
diff --git a/src/lib/libcrypto/arc4random/arc4random_solaris.h b/src/lib/libcrypto/arc4random/arc4random_solaris.h index 128f61e003..e5ebbfb7e5 100644 --- a/src/lib/libcrypto/arc4random/arc4random_solaris.h +++ b/src/lib/libcrypto/arc4random/arc4random_solaris.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: arc4random_solaris.h,v 1.4 2014/07/19 13:02:28 bcook Exp $ */ | 1 | /* $OpenBSD: arc4random_solaris.h,v 1.5 2014/07/19 14:34:38 bcook Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> |
| @@ -21,6 +21,13 @@ | |||
| 21 | /* | 21 | /* |
| 22 | * Stub functions for portability. | 22 | * Stub functions for portability. |
| 23 | */ | 23 | */ |
| 24 | |||
| 25 | #include <pthread.h> | ||
| 26 | |||
| 27 | static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER; | ||
| 28 | #define _ARC4_LOCK() pthread_mutex_lock(&arc4random_mtx) | ||
| 29 | #define _ARC4_UNLOCK() pthread_mutex_unlock(&arc4random_mtx) | ||
| 30 | |||
| 24 | static volatile sig_atomic_t _rs_forked; | 31 | static volatile sig_atomic_t _rs_forked; |
| 25 | 32 | ||
| 26 | static inline void | 33 | static inline void |
diff --git a/src/lib/libcrypto/crypto/arc4random_linux.h b/src/lib/libcrypto/crypto/arc4random_linux.h index 992ee6bb8e..29dad3b9ad 100644 --- a/src/lib/libcrypto/crypto/arc4random_linux.h +++ b/src/lib/libcrypto/crypto/arc4random_linux.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: arc4random_linux.h,v 1.4 2014/07/19 13:02:28 bcook Exp $ */ | 1 | /* $OpenBSD: arc4random_linux.h,v 1.5 2014/07/19 14:34:38 bcook Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> |
| @@ -22,6 +22,12 @@ | |||
| 22 | * Stub functions for portability. | 22 | * Stub functions for portability. |
| 23 | */ | 23 | */ |
| 24 | 24 | ||
| 25 | #include <pthread.h> | ||
| 26 | |||
| 27 | static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER; | ||
| 28 | #define _ARC4_LOCK() pthread_mutex_lock(&arc4random_mtx) | ||
| 29 | #define _ARC4_UNLOCK() pthread_mutex_unlock(&arc4random_mtx) | ||
| 30 | |||
| 25 | static volatile sig_atomic_t _rs_forked; | 31 | static volatile sig_atomic_t _rs_forked; |
| 26 | 32 | ||
| 27 | static inline void | 33 | static inline void |
diff --git a/src/lib/libcrypto/crypto/arc4random_osx.h b/src/lib/libcrypto/crypto/arc4random_osx.h index 274288000f..55932bb823 100644 --- a/src/lib/libcrypto/crypto/arc4random_osx.h +++ b/src/lib/libcrypto/crypto/arc4random_osx.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: arc4random_osx.h,v 1.4 2014/07/19 13:02:28 bcook Exp $ */ | 1 | /* $OpenBSD: arc4random_osx.h,v 1.5 2014/07/19 14:34:38 bcook Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> |
| @@ -22,6 +22,12 @@ | |||
| 22 | * Stub functions for portability. | 22 | * Stub functions for portability. |
| 23 | */ | 23 | */ |
| 24 | 24 | ||
| 25 | #include <pthread.h> | ||
| 26 | |||
| 27 | static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER; | ||
| 28 | #define _ARC4_LOCK() pthread_mutex_lock(&arc4random_mtx) | ||
| 29 | #define _ARC4_UNLOCK() pthread_mutex_unlock(&arc4random_mtx) | ||
| 30 | |||
| 25 | static volatile sig_atomic_t _rs_forked; | 31 | static volatile sig_atomic_t _rs_forked; |
| 26 | 32 | ||
| 27 | static inline void | 33 | static inline void |
diff --git a/src/lib/libcrypto/crypto/arc4random_solaris.h b/src/lib/libcrypto/crypto/arc4random_solaris.h index 128f61e003..e5ebbfb7e5 100644 --- a/src/lib/libcrypto/crypto/arc4random_solaris.h +++ b/src/lib/libcrypto/crypto/arc4random_solaris.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: arc4random_solaris.h,v 1.4 2014/07/19 13:02:28 bcook Exp $ */ | 1 | /* $OpenBSD: arc4random_solaris.h,v 1.5 2014/07/19 14:34:38 bcook Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> |
| @@ -21,6 +21,13 @@ | |||
| 21 | /* | 21 | /* |
| 22 | * Stub functions for portability. | 22 | * Stub functions for portability. |
| 23 | */ | 23 | */ |
| 24 | |||
| 25 | #include <pthread.h> | ||
| 26 | |||
| 27 | static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER; | ||
| 28 | #define _ARC4_LOCK() pthread_mutex_lock(&arc4random_mtx) | ||
| 29 | #define _ARC4_UNLOCK() pthread_mutex_unlock(&arc4random_mtx) | ||
| 30 | |||
| 24 | static volatile sig_atomic_t _rs_forked; | 31 | static volatile sig_atomic_t _rs_forked; |
| 25 | 32 | ||
| 26 | static inline void | 33 | static inline void |
