From: Tomas Mraz Date: Wed, 28 Jun 2023 09:43:37 +0000 (+0200) Subject: hpke.h, thread.h: Add extern "C" for C++ inclusion X-Git-Tag: openssl-3.2.0-alpha1~570 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed5c0dfdf4f2d386fadfadcd8692a521061c772d;p=thirdparty%2Fopenssl.git hpke.h, thread.h: Add extern "C" for C++ inclusion Fixes #21305 Reviewed-by: Matt Caswell Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/21307) --- diff --git a/include/openssl/hpke.h b/include/openssl/hpke.h index 8f615edbdcf..e39a485023d 100644 --- a/include/openssl/hpke.h +++ b/include/openssl/hpke.h @@ -72,6 +72,10 @@ # define OSSL_HPKE_ROLE_SENDER 0 # define OSSL_HPKE_ROLE_RECEIVER 1 +# ifdef __cplusplus +extern "C" { +# endif + typedef struct { uint16_t kem_id; /* Key Encapsulation Method id */ uint16_t kdf_id; /* Key Derivation Function id */ @@ -157,4 +161,8 @@ size_t OSSL_HPKE_get_ciphertext_size(OSSL_HPKE_SUITE suite, size_t clearlen); size_t OSSL_HPKE_get_public_encap_size(OSSL_HPKE_SUITE suite); size_t OSSL_HPKE_get_recommended_ikmelen(OSSL_HPKE_SUITE suite); +# ifdef __cplusplus +} +# endif + #endif diff --git a/include/openssl/thread.h b/include/openssl/thread.h index 68ecf9c4c4f..d34aa5ba949 100644 --- a/include/openssl/thread.h +++ b/include/openssl/thread.h @@ -16,8 +16,16 @@ # include +# ifdef __cplusplus +extern "C" { +# endif + uint32_t OSSL_get_thread_support_flags(void); int OSSL_set_max_threads(OSSL_LIB_CTX *ctx, uint64_t max_threads); uint64_t OSSL_get_max_threads(OSSL_LIB_CTX *ctx); +# ifdef __cplusplus +} +# endif + #endif /* OPENSSL_THREAD_H */