From 650c66873793bed505802f316b15772a0f887743 Mon Sep 17 00:00:00 2001 From: "Randall S. Becker" Date: Fri, 26 Mar 2021 06:34:49 -0600 Subject: Corrected missing definitions from NonStop SPT build. This change includes swapping the PUT and SPT configuration, includes of sys/stat.h and sys/types.h in the correct scope to be picked up by SPT definitions. Fixes: #14698 Fixes: #14734 CLA: The author has the permission to grant the OpenSSL Team the right to use this change. Signed-off-by: Randall S. Becker Reviewed-by: Richard Levitte Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/14736) --- include/internal/cryptlib.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'include/internal/cryptlib.h') diff --git a/include/internal/cryptlib.h b/include/internal/cryptlib.h index fb46657dba..ea42447e78 100644 --- a/include/internal/cryptlib.h +++ b/include/internal/cryptlib.h @@ -217,10 +217,18 @@ static ossl_inline void ossl_sleep(unsigned long millis) ts.tv_sec = (long int) (millis / 1000); ts.tv_nsec = (long int) (millis % 1000) * 1000000ul; nanosleep(&ts, NULL); -# elif defined(__TANDEM) && !defined(_REENTRANT) -# include +# elif defined(__TANDEM) +# if !defined(_REENTRANT) +# include /* HPNS does not support usleep for non threaded apps */ PROCESS_DELAY_(millis * 1000); +# elif defined(_SPT_MODEL_) +# include +# include + usleep(millis * 1000); +# else + usleep(millis * 1000); +# endif # else usleep(millis * 1000); # endif -- cgit v1.2.3