Tell MSVC to allow non-s functions where needed

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine
2026-02-21 20:20:02 +01:00
parent 37fd7d5210
commit 037f3c62ff
5 changed files with 45 additions and 0 deletions

View File

@@ -5,6 +5,15 @@
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
*/
/* Tell MSVC that we're ok with using classic C functions even
* when an `_s` variant exist. For most functions, the improvements
* of the `_s` variants are of limited usefulness and not worth
* the portability headaches.
*/
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
#define _CRT_SECURE_NO_DEPRECATE 1
#endif
#define MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS
#include "mbedtls/build_info.h"