From 1882cbe44e6140bebb2d27dc18af06dfcb0157f5 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Tue, 4 Jan 2022 13:50:02 +0100 Subject: [PATCH] mdns: Make fuzzer layers compatible with llvm>=6 --- .../test_afl_host/esp_netif_loopback_mock.c | 19 ++++++------------- components/lwip/test_afl_host/no_warn_host.h | 1 + .../mdns/test_afl_fuzz_host/esp32_mock.h | 19 ++++++------------- tools/ci/check_copyright_ignore.txt | 2 -- 4 files changed, 13 insertions(+), 28 deletions(-) diff --git a/components/lwip/test_afl_host/esp_netif_loopback_mock.c b/components/lwip/test_afl_host/esp_netif_loopback_mock.c index ba7bbccb3c..a86b64fd55 100644 --- a/components/lwip/test_afl_host/esp_netif_loopback_mock.c +++ b/components/lwip/test_afl_host/esp_netif_loopback_mock.c @@ -1,17 +1,10 @@ -// Copyright 2020 Espressif Systems (Shanghai) CO 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: 2020-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#include #include "esp_netif_lwip_internal.h" esp_err_t esp_netif_get_ip_info(esp_netif_t *esp_netif, esp_netif_ip_info_t *ip_info) diff --git a/components/lwip/test_afl_host/no_warn_host.h b/components/lwip/test_afl_host/no_warn_host.h index 37ab01ebec..8d75837192 100644 --- a/components/lwip/test_afl_host/no_warn_host.h +++ b/components/lwip/test_afl_host/no_warn_host.h @@ -3,3 +3,4 @@ #define __warning__ deprecated #define IRAM_ATTR #define __ESP_ATTR_H__ +#include diff --git a/components/mdns/test_afl_fuzz_host/esp32_mock.h b/components/mdns/test_afl_fuzz_host/esp32_mock.h index 5acf53842e..c1163e9b6b 100644 --- a/components/mdns/test_afl_fuzz_host/esp32_mock.h +++ b/components/mdns/test_afl_fuzz_host/esp32_mock.h @@ -1,16 +1,8 @@ -// Copyright 2015-2016 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: 2015-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef _ESP32_COMPAT_H_ #define _ESP32_COMPAT_H_ @@ -20,6 +12,7 @@ #define _ESP_TASK_H_ #ifdef USE_BSD_STRING +#include #include #endif #include diff --git a/tools/ci/check_copyright_ignore.txt b/tools/ci/check_copyright_ignore.txt index e2f743794d..f2624300f8 100644 --- a/tools/ci/check_copyright_ignore.txt +++ b/tools/ci/check_copyright_ignore.txt @@ -1244,7 +1244,6 @@ components/lwip/test_afl_host/dhcp_di.h components/lwip/test_afl_host/dhcpserver_di.h components/lwip/test_afl_host/dns_di.h components/lwip/test_afl_host/esp_attr.h -components/lwip/test_afl_host/esp_netif_loopback_mock.c components/lwip/test_afl_host/network_mock.c components/lwip/test_afl_host/no_warn_host.h components/lwip/test_afl_host/test_dhcp_client.c @@ -1351,7 +1350,6 @@ components/mdns/mdns_networking_lwip.c components/mdns/private_include/mdns_networking.h components/mdns/test/test_mdns.c components/mdns/test_afl_fuzz_host/esp32_mock.c -components/mdns/test_afl_fuzz_host/esp32_mock.h components/mdns/test_afl_fuzz_host/esp_attr.h components/mdns/test_afl_fuzz_host/esp_netif_mock.c components/mdns/test_afl_fuzz_host/mdns_di.h