diff options
author | Matt Caswell <matt@openssl.org> | 2020-12-09 16:26:29 +0000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-12-14 10:45:27 +1000 |
commit | c739222b5ad68fa23bfdf4807106769f9428506c (patch) | |
tree | 57998d60c90e25af2fda76e2e34b40fde30f719b /crypto/threads_lib.c | |
parent | 469491536d7810337110823f1b5ca296c7ca8cc1 (diff) | |
download | openssl-c739222b5ad68fa23bfdf4807106769f9428506c.tar.gz |
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)
Diffstat (limited to 'crypto/threads_lib.c')
-rw-r--r-- | crypto/threads_lib.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/crypto/threads_lib.c b/crypto/threads_lib.c new file mode 100644 index 0000000000..0c7162392d --- /dev/null +++ b/crypto/threads_lib.c @@ -0,0 +1,25 @@ +/* + * Copyright 2020 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the Apache License 2.0 (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ +#include <openssl/crypto.h> + +#ifndef OPENSSL_NO_DEPRECATED_3_0 + +void OPENSSL_fork_prepare(void) +{ +} + +void OPENSSL_fork_parent(void) +{ +} + +void OPENSSL_fork_child(void) +{ +} + +#endif |