diff options
Diffstat (limited to 'openbsd-compat/arc4random.c')
-rw-r--r-- | openbsd-compat/arc4random.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/openbsd-compat/arc4random.c b/openbsd-compat/arc4random.c index f43b5c7c..2f91c2b2 100644 --- a/openbsd-compat/arc4random.c +++ b/openbsd-compat/arc4random.c @@ -35,6 +35,15 @@ #ifndef HAVE_ARC4RANDOM +/* + * If we're not using a native getentropy, use the one from bsd-getentropy.c + * under a different name, so that if in future these binaries are run on + * a system that has a native getentropy OpenSSL cannot call the wrong one. + */ +#ifndef HAVE_GETENTROPY +# define getentropy(x, y) (_ssh_compat_getentropy((x), (y))) +#endif + #define MINIMUM(a, b) (((a) < (b)) ? (a) : (b)) #include "log.h" |