From c947585ee473b290eca6c376c46c115a0fd6e155 Mon Sep 17 00:00:00 2001 From: Scott Mabin Date: Wed, 1 Jun 2022 13:49:32 +0100 Subject: [PATCH] newlib: dirent d_ino type fix As per the posix spec, `d_ino` should be defined as `ino_t`. See the reference: http://pubs.opengroup.org/onlinepubs/7908799/xsh/dirent.h.html. --- .../newlib/platform_include/sys/dirent.h | 21 +++++++------------ tools/ci/check_copyright_ignore.txt | 1 - 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/components/newlib/platform_include/sys/dirent.h b/components/newlib/platform_include/sys/dirent.h index bfa49f5ea4..d3a40e4806 100644 --- a/components/newlib/platform_include/sys/dirent.h +++ b/components/newlib/platform_include/sys/dirent.h @@ -1,21 +1,14 @@ -// 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 + */ #pragma once #include #include +#include /** * This header file provides POSIX-compatible definitions of directory @@ -42,7 +35,7 @@ typedef struct { * @brief Directory entry structure */ struct dirent { - int d_ino; /*!< file number */ + ino_t d_ino; /*!< file number */ uint8_t d_type; /*!< not defined in POSIX, but present in BSD and Linux */ #define DT_UNKNOWN 0 #define DT_REG 1 diff --git a/tools/ci/check_copyright_ignore.txt b/tools/ci/check_copyright_ignore.txt index 041eea257d..73ecaaa69c 100644 --- a/tools/ci/check_copyright_ignore.txt +++ b/tools/ci/check_copyright_ignore.txt @@ -1049,7 +1049,6 @@ components/newlib/assert.c components/newlib/platform_include/assert.h components/newlib/platform_include/net/if.h components/newlib/platform_include/pthread.h -components/newlib/platform_include/sys/dirent.h components/newlib/platform_include/sys/ioctl.h components/newlib/platform_include/sys/lock.h components/newlib/platform_include/sys/poll.h