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 <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6421)
#if defined(__OpenBSD__) || defined(__NetBSD__)
# include <sys/param.h>
#endif
-#ifdef OPENSSL_SYS_UNIX
+
+#if defined(OPENSSL_SYS_UNIX) || defined(__DJGPP__)
# include <sys/types.h>
# include <unistd.h>
# include <sys/time.h>
# define OSSL_POSIX_TIMER_OKAY
# endif
# endif
-#endif
+#endif /* defined(OPENSSL_SYS_UNIX) || defined(__DJGPP__) */
int syscall_random(void *buf, size_t buflen);
# endif
#endif
-#ifdef OPENSSL_SYS_UNIX
+#if defined(OPENSSL_SYS_UNIX) || defined(__DJGPP__)
int rand_pool_add_nonce_data(RAND_POOL *pool)
{
struct {
# endif
return time(NULL);
}
-#endif
+#endif /* defined(OPENSSL_SYS_UNIX) || defined(__DJGPP__) */