diff --git a/.gitignore b/.gitignore index e7b47788..9b3fae34 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ DerivedData .*.sw[nop] +.vscode diff --git a/Sources/CCryptoBoringSSLShims/include/CCryptoBoringSSLShims.h b/Sources/CCryptoBoringSSLShims/include/CCryptoBoringSSLShims.h index d8a737f9..4ef86401 100644 --- a/Sources/CCryptoBoringSSLShims/include/CCryptoBoringSSLShims.h +++ b/Sources/CCryptoBoringSSLShims/include/CCryptoBoringSSLShims.h @@ -22,6 +22,10 @@ #include #endif +#if defined(__cplusplus) +extern "C" { +#endif + // MARK:- Pointer type shims // This section of the code handles shims that change uint8_t* pointers to // void *s. This is done because Swift does not have the rule that C does, that @@ -120,4 +124,8 @@ int CCryptoBoringSSLShims_RSA_public_encrypt(int flen, const void *from, void *t int CCryptoBoringSSLShims_RSA_private_decrypt(int flen, const void *from, void *to, RSA *rsa, int padding); +#if defined(__cplusplus) +} +#endif // defined(__cplusplus) + #endif // C_CRYPTO_BORINGSSL_SHIMS_H