From: Dr. Matthias St. Pierre Date: Tue, 5 Jun 2018 21:22:06 +0000 (+0200) Subject: RAND_POOL: Add missing implementations for djgpp X-Git-Tag: OpenSSL_1_1_1-pre8~21 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=748eb991f49585a609ec65b0d8d26835a2911045 RAND_POOL: Add missing implementations for djgpp Calling the functions rand_pool_add_{additional,nonce}_data() in crypto/rand/rand_lib.c with no implementation for djgpp/MSDOS causees unresolved symbols when linking with djgpp. Reported and fixed by Gisle Vanem Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6421) --- diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c index 798908120d..fafa359d49 100644 --- a/crypto/rand/rand_unix.c +++ b/crypto/rand/rand_unix.c @@ -27,7 +27,8 @@ #if defined(__OpenBSD__) || defined(__NetBSD__) # include #endif -#ifdef OPENSSL_SYS_UNIX + +#if defined(OPENSSL_SYS_UNIX) || defined(__DJGPP__) # include # include # include @@ -70,7 +71,7 @@ static uint64_t get_timer_bits(void); # define OSSL_POSIX_TIMER_OKAY # endif # endif -#endif +#endif /* defined(OPENSSL_SYS_UNIX) || defined(__DJGPP__) */ int syscall_random(void *buf, size_t buflen); @@ -392,7 +393,7 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool) # endif #endif -#ifdef OPENSSL_SYS_UNIX +#if defined(OPENSSL_SYS_UNIX) || defined(__DJGPP__) int rand_pool_add_nonce_data(RAND_POOL *pool) { struct { @@ -512,4 +513,4 @@ static uint64_t get_timer_bits(void) # endif return time(NULL); } -#endif +#endif /* defined(OPENSSL_SYS_UNIX) || defined(__DJGPP__) */