diff --git a/crypto/build.info b/crypto/build.info index 814d8dcab7..7fe79e2296 100644 --- a/crypto/build.info +++ b/crypto/build.info @@ -71,7 +71,7 @@ $UTIL_COMMON=\ cryptlib.c params.c params_from_text.c bsearch.c ex_data.c o_str.c \ ctype.c threads_pthread.c threads_win.c threads_none.c initthread.c \ context.c sparse_array.c asn1_dsa.c packet.c param_build.c $CPUIDASM \ - param_build_set.c der_writer.c passphrase.c + param_build_set.c der_writer.c passphrase.c threads_lib.c $UTIL_DEFINE=$CPUIDDEF SOURCE[../libcrypto]=$UTIL_COMMON \ 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 + +#ifndef OPENSSL_NO_DEPRECATED_3_0 + +void OPENSSL_fork_prepare(void) +{ +} + +void OPENSSL_fork_parent(void) +{ +} + +void OPENSSL_fork_child(void) +{ +} + +#endif diff --git a/crypto/threads_pthread.c b/crypto/threads_pthread.c index d7cac6566a..afc29b7961 100644 --- a/crypto/threads_pthread.c +++ b/crypto/threads_pthread.c @@ -200,21 +200,6 @@ int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock) # ifndef FIPS_MODULE # ifdef OPENSSL_SYS_UNIX -# ifndef OPENSSL_NO_DEPRECATED_3_0 - -void OPENSSL_fork_prepare(void) -{ -} - -void OPENSSL_fork_parent(void) -{ -} - -void OPENSSL_fork_child(void) -{ -} - -# endif static pthread_once_t fork_once_control = PTHREAD_ONCE_INIT; static void fork_once_func(void)