Browse Source

Define threads_lib.c functions only for OPENSSL_SYS_UNIX

This matches the declaration in <openssl/crypto.h>.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19322)
J.W. Jagersma 1 year ago
parent
commit
523e54c15c
1 changed files with 3 additions and 1 deletions
  1. 3 1
      crypto/threads_lib.c

+ 3 - 1
crypto/threads_lib.c

@@ -8,7 +8,8 @@
  */
 #include <openssl/crypto.h>
 
-#ifndef OPENSSL_NO_DEPRECATED_3_0
+#ifdef OPENSSL_SYS_UNIX
+# ifndef OPENSSL_NO_DEPRECATED_3_0
 
 void OPENSSL_fork_prepare(void)
 {
@@ -22,4 +23,5 @@ void OPENSSL_fork_child(void)
 {
 }
 
+# endif
 #endif