From: Randall S. Becker Date: Mon, 6 Oct 2025 23:02:42 +0000 (+0100) Subject: Fixes for NonStop builds on 3.5 to handle OS platform header file changes. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b2ed1b72fa56e71d53af213e6e5557dcce171a2c;p=thirdparty%2Fopenssl.git Fixes for NonStop builds on 3.5 to handle OS platform header file changes. This changes handles the introduction of _POSIX_VERSION into the NonStop x86 header files that tricks OpenSSL into thinking that ucontext.h is available. Fixes #28498 Signed-off-by: Randall S. Becker Reviewed-by: Neil Horman Reviewed-by: Saša Nedvědický Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/28769) (cherry picked from commit fb2f239ca1bd05f609e9e1e06b4b84f7f628d21b) --- diff --git a/Configurations/50-nonstop.conf b/Configurations/50-nonstop.conf index a68f2008562..24ab6009fcf 100644 --- a/Configurations/50-nonstop.conf +++ b/Configurations/50-nonstop.conf @@ -168,6 +168,7 @@ # Build models 'nonstop-model-put' => { template => 1, + disable => ['secure-memory'], defines => ['_PUT_MODEL_', '_REENTRANT', '_THREAD_SUPPORT_FUNCTIONS'], ex_libs => '-lput', @@ -177,6 +178,7 @@ # Build models 'nonstop-model-klt' => { template => 1, + disable => ['secure-memory'], defines => ['_KLT_MODEL_', '_REENTRANT', '_THREAD_SUPPORT_FUNCTIONS'], ex_libs => '-lklt', diff --git a/NOTES-NONSTOP.md b/NOTES-NONSTOP.md index 30deed20b8e..a2d485132da 100644 --- a/NOTES-NONSTOP.md +++ b/NOTES-NONSTOP.md @@ -37,8 +37,7 @@ for each on the TNS/X (L-Series) platform: The KLT threading model is a newly released model on NonStop. It implements kernel-level threading. KLT provides much closer threading to what OpenSSL uses for Linux-like threading models. KLT continues to use the pthread library -API. There is no supported 32-bit or Guardian builds for KLT. Note: KLT is -not currently available but is planned for post-2024. +API. There is no supported 32-bit or Guardian builds for KLT. The SPT threading model is no longer supported as of OpenSSL 3.2. @@ -53,6 +52,9 @@ instead of `nsx` in the set above. You cannot build for TNS/E for FIPS, so you must specify the `no-fips` option to `./Configure`. +TNS/E has moved to a limited support state, so fixes for this platform will not +be guaranteed in future. + Linking and Loading Considerations ---------------------------------- @@ -73,6 +75,12 @@ for NonStop builds. If you need to have `atexit()` functionality, set register `OPENSSL_cleanup()` automatically. Preferably, you can explicitly call `OPENSSL_cleanup()` from your application. +Secure Memory +------------- + +The mechanism used by OpenSSL for secure memory is not supported on NonStop. +Use the `no-secure-memory` option when running `Configure`. + About Prefix and OpenSSLDir --------------------------- diff --git a/crypto/async/arch/async_posix.h b/crypto/async/arch/async_posix.h index ceb86e24bf3..b953d2e9f9c 100644 --- a/crypto/async/arch/async_posix.h +++ b/crypto/async/arch/async_posix.h @@ -13,7 +13,8 @@ #if defined(OPENSSL_SYS_UNIX) \ && defined(OPENSSL_THREADS) && !defined(OPENSSL_NO_ASYNC) \ - && !defined(__ANDROID__) && !defined(__OpenBSD__) + && !defined(__ANDROID__) && !defined(__OpenBSD__) \ + && !defined(OPENSSL_SYS_TANDEM) # include @@ -48,10 +49,14 @@ */ # define USE_SWAPCONTEXT # endif -# include -# ifndef USE_SWAPCONTEXT -# include -# endif +# if defined(OPENSSL_SYS_TANDEM) +# include +# else +# include +# endif +# ifndef USE_SWAPCONTEXT +# include +# endif typedef struct async_fibre_st { ucontext_t fibre;