msvc-redeclaration-bug.diff 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. diff --git a/thirdparty/mbedtls/include/psa/crypto.h b/thirdparty/mbedtls/include/psa/crypto.h
  2. index 2bbcea3ee0..96baf8f3ed 100644
  3. --- a/thirdparty/mbedtls/include/psa/crypto.h
  4. +++ b/thirdparty/mbedtls/include/psa/crypto.h
  5. @@ -107,7 +107,9 @@ psa_status_t psa_crypto_init(void);
  6. /** Return an initial value for a key attributes structure.
  7. */
  8. +#if !(defined(__cplusplus) && defined(_MSC_VER))
  9. static psa_key_attributes_t psa_key_attributes_init(void);
  10. +#endif
  11. /** Declare a key as persistent and set its key identifier.
  12. *
  13. @@ -336,7 +338,9 @@ static void psa_set_key_bits(psa_key_attributes_t *attributes,
  14. *
  15. * \return The key type stored in the attribute structure.
  16. */
  17. +#if !(defined(__cplusplus) && defined(_MSC_VER))
  18. static psa_key_type_t psa_get_key_type(const psa_key_attributes_t *attributes);
  19. +#endif
  20. /** Retrieve the key size from key attributes.
  21. *
  22. @@ -939,7 +943,9 @@ typedef struct psa_hash_operation_s psa_hash_operation_t;
  23. /** Return an initial value for a hash operation object.
  24. */
  25. +#if !(defined(__cplusplus) && defined(_MSC_VER))
  26. static psa_hash_operation_t psa_hash_operation_init(void);
  27. +#endif
  28. /** Set up a multipart hash operation.
  29. *
  30. @@ -1298,7 +1304,9 @@ typedef struct psa_mac_operation_s psa_mac_operation_t;
  31. /** Return an initial value for a MAC operation object.
  32. */
  33. +#if !(defined(__cplusplus) && defined(_MSC_VER))
  34. static psa_mac_operation_t psa_mac_operation_init(void);
  35. +#endif
  36. /** Set up a multipart MAC calculation operation.
  37. *
  38. @@ -1711,7 +1719,9 @@ typedef struct psa_cipher_operation_s psa_cipher_operation_t;
  39. /** Return an initial value for a cipher operation object.
  40. */
  41. +#if !(defined(__cplusplus) && defined(_MSC_VER))
  42. static psa_cipher_operation_t psa_cipher_operation_init(void);
  43. +#endif
  44. /** Set the key for a multipart symmetric encryption operation.
  45. *
  46. @@ -2229,7 +2239,9 @@ typedef struct psa_aead_operation_s psa_aead_operation_t;
  47. /** Return an initial value for an AEAD operation object.
  48. */
  49. +#if !(defined(__cplusplus) && defined(_MSC_VER))
  50. static psa_aead_operation_t psa_aead_operation_init(void);
  51. +#endif
  52. /** Set the key for a multipart authenticated encryption operation.
  53. *
  54. @@ -3216,7 +3228,9 @@ typedef struct psa_key_derivation_s psa_key_derivation_operation_t;
  55. /** Return an initial value for a key derivation operation object.
  56. */
  57. +#if !(defined(__cplusplus) && defined(_MSC_VER))
  58. static psa_key_derivation_operation_t psa_key_derivation_operation_init(void);
  59. +#endif
  60. /** Set up a key derivation operation.
  61. *
  62. diff --git a/thirdparty/mbedtls/include/psa/crypto_extra.h b/thirdparty/mbedtls/include/psa/crypto_extra.h
  63. index 0cf42c6055..d276cd4c7f 100644
  64. --- a/thirdparty/mbedtls/include/psa/crypto_extra.h
  65. +++ b/thirdparty/mbedtls/include/psa/crypto_extra.h
  66. @@ -923,7 +923,9 @@ typedef struct psa_pake_cipher_suite_s psa_pake_cipher_suite_t;
  67. /** Return an initial value for a PAKE cipher suite object.
  68. */
  69. +#if !(defined(__cplusplus) && defined(_MSC_VER))
  70. static psa_pake_cipher_suite_t psa_pake_cipher_suite_init(void);
  71. +#endif
  72. /** Retrieve the PAKE algorithm from a PAKE cipher suite.
  73. *
  74. @@ -1056,7 +1058,9 @@ typedef struct psa_jpake_computation_stage_s psa_jpake_computation_stage_t;
  75. /** Return an initial value for a PAKE operation object.
  76. */
  77. +#if !(defined(__cplusplus) && defined(_MSC_VER))
  78. static psa_pake_operation_t psa_pake_operation_init(void);
  79. +#endif
  80. /** Get the length of the password in bytes from given inputs.
  81. *