| From 84d6430f412d869a56bbcce070d5b730386e540a Mon Sep 17 00:00:00 2001 |
| From: George Poulios <gpoulios@census-labs.com> |
| Date: Thu, 5 Dec 2024 02:28:19 +0200 |
| Subject: [PATCH 3/3] Fix MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT warning |
| |
| When MBEDTLS_SSL_PROTO_DTLS is not defined, config_adjust_ssl.h |
| undefines (among others) MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT. |
| Then the preprocessor comparison with 0 generates Wundef. Wrap |
| the comparison under a defined() check to suppress this. This |
| breaks builds on systems with -Werror. |
| |
| Signed-off-by: George Poulios <gpoulios@census-labs.com> |
| --- |
| include/mbedtls/ssl.h | 3 ++- |
| 1 file changed, 2 insertions(+), 1 deletion(-) |
| |
| diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h |
| index 42fffbf860..c68be5e30a 100644 |
| --- a/include/mbedtls/ssl.h |
| +++ b/include/mbedtls/ssl.h |
| @@ -620,7 +620,8 @@ |
| #define MBEDTLS_TLS_EXT_SIG_ALG_CERT 50 /* RFC 8446 TLS 1.3 */ |
| #define MBEDTLS_TLS_EXT_KEY_SHARE 51 /* RFC 8446 TLS 1.3 */ |
| |
| -#if MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT == 0 |
| +#if !defined(MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT) || \ |
| + MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT == 0 |
| #define MBEDTLS_TLS_EXT_CID 54 /* RFC 9146 DTLS 1.2 CID */ |
| #else |
| #define MBEDTLS_TLS_EXT_CID 254 /* Pre-RFC 9146 DTLS 1.2 CID */ |
| -- |
| 2.39.5 (Apple Git-154) |
| |