diff options
author | Niclas Rosenvik <youremailsarecrap@gmail.com> | 2021-04-20 19:14:27 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-04-22 17:52:06 +0200 |
commit | 1f3b58d8413cfa3824e9c0a146dee6ceedbc367e (patch) | |
tree | add1500aeb22cfd548faa480de8e7396a3893a1d /include | |
parent | ef7ae359109c7c4edb252523d5ab1467ae1d2110 (diff) |
Some compilers define __STDC_VERSION__ in c++
Some compilers(g++ on Solaris/Illumos) define __STDC__VERSION__ in c++ .
This causes c++ code that uses openssl to break on these compilers since
_Noreturn is not a keyword in c++ .
CLA: trivial
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14944)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/e_os2.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/openssl/e_os2.h b/include/openssl/e_os2.h index 13420d9928..eb8c46d72a 100644 --- a/include/openssl/e_os2.h +++ b/include/openssl/e_os2.h @@ -274,7 +274,8 @@ typedef unsigned __int64 uint64_t; # define ossl_inline inline # endif -# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && \ + !defined(__cplusplus) # define ossl_noreturn _Noreturn # elif defined(__GNUC__) && __GNUC__ >= 2 # define ossl_noreturn __attribute__((noreturn)) |