Fix no-threads
authorMatt Caswell <matt@openssl.org>
Wed, 9 Dec 2020 16:26:29 +0000 (16:26 +0000)
committerPauli <paul.dale@oracle.com>
Mon, 14 Dec 2020 00:45:27 +0000 (10:45 +1000)
commitc739222b5ad68fa23bfdf4807106769f9428506c
tree57998d60c90e25af2fda76e2e34b40fde30f719b
parent469491536d7810337110823f1b5ca296c7ca8cc1
Fix no-threads

Make OPENSSL_fork_prepare() et al always available even in a no-threads
build. These functions are no-ops anyway so this shouldn't make any
difference.

This fixes an issue where the symbol_presence test fails in a no-threads
build. This is because these functions have not been marked in
libcrypto.num as being dependent on thread support. Enclosing the
declarations of the functions in the header with an appropriate guard
does not help because we never define OPENSSL_NO_THREADS (we define the
opposite OPENSSL_THREADS). This confuses the scripts which only consider
OPENSSL_NO_* guards. The simplest solution is to just make them always
available.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13647)
crypto/build.info
crypto/threads_lib.c [new file with mode: 0644]
crypto/threads_pthread.c