From 52170fba7f43d933232d7f9579ad4d9892162935 Mon Sep 17 00:00:00 2001 From: Laukik Hase Date: Mon, 21 Mar 2022 11:11:13 +0530 Subject: [PATCH] esp_crt_bundle: Fix build error - When `esp_crt_bundle.h` is included before any config, a build error (`esp_err_t` not defined) is observed Closes https://github.com/espressif/esp-idf/issues/8606 --- .../mbedtls/esp_crt_bundle/esp_crt_bundle.c | 1 - .../esp_crt_bundle/include/esp_crt_bundle.h | 19 ++++++------------- tools/ci/check_copyright_ignore.txt | 1 - 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/components/mbedtls/esp_crt_bundle/esp_crt_bundle.c b/components/mbedtls/esp_crt_bundle/esp_crt_bundle.c index cbe6cf431d..fef27ef6a7 100644 --- a/components/mbedtls/esp_crt_bundle/esp_crt_bundle.c +++ b/components/mbedtls/esp_crt_bundle/esp_crt_bundle.c @@ -7,7 +7,6 @@ #include #include "esp_crt_bundle.h" #include "esp_log.h" -#include "esp_err.h" #define BUNDLE_HEADER_OFFSET 2 #define CRT_HEADER_OFFSET 4 diff --git a/components/mbedtls/esp_crt_bundle/include/esp_crt_bundle.h b/components/mbedtls/esp_crt_bundle/include/esp_crt_bundle.h index 33fb98b996..19826d286b 100644 --- a/components/mbedtls/esp_crt_bundle/include/esp_crt_bundle.h +++ b/components/mbedtls/esp_crt_bundle/include/esp_crt_bundle.h @@ -1,21 +1,14 @@ -// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2017-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef _ESP_CRT_BUNDLE_H_ #define _ESP_CRT_BUNDLE_H_ +#include "esp_err.h" #include "mbedtls/ssl.h" #ifdef __cplusplus diff --git a/tools/ci/check_copyright_ignore.txt b/tools/ci/check_copyright_ignore.txt index 57311afcb3..622183dd9f 100644 --- a/tools/ci/check_copyright_ignore.txt +++ b/tools/ci/check_copyright_ignore.txt @@ -1061,7 +1061,6 @@ components/lwip/test_afl_host/test_dhcp_client.c components/lwip/test_afl_host/test_dhcp_server.c components/lwip/test_afl_host/test_dns.c components/lwip/weekend_test/net_suite_test.py -components/mbedtls/esp_crt_bundle/include/esp_crt_bundle.h components/mbedtls/esp_crt_bundle/test_gen_crt_bundle/test_gen_crt_bundle.py components/mbedtls/port/aes/block/esp_aes.c components/mbedtls/port/aes/dma/esp_aes.c