Merge branch 'bugfix/newlib_missing_include' into 'master'

[newlib]: Added missing includes

Closes IDFGH-5789

See merge request espressif/esp-idf!15387
This commit is contained in:
Jakob Hasse 2021-10-14 05:56:08 +00:00
commit 4a8bbb4586
3 changed files with 34 additions and 45 deletions

View File

@ -1,28 +1,3 @@
// Copyright 2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2020 Francesco Giancane <francesco.giancane@accenture.com>
//
// 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.
/*
* This is a compatibility header for <endian.h>.
* In xtensa-newlib distribution it is located in <machine/endian.h>
* but most program expect to be plain <endian.h>.
*/
#ifndef XTENSA_COMPAT_ENDIAN_H_INCLUDED
#define XTENSA_COMPAT_ENDIAN_H_INCLUDED
#include <machine/endian.h>
/*
* All the code below is a rework of
* https://github.com/freebsd/freebsd/blob/master/sys/sys/endian.h
@ -32,7 +7,10 @@
*/
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
* SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2020 Francesco Giancane <francesco.giancane@accenture.com>
* SPDX-FileCopyrightText: 2002 Thomas Moestl <tmm@FreeBSD.org>
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND Apache-2.0
*
* Copyright (c) 2002 Thomas Moestl <tmm@FreeBSD.org>
* All rights reserved.
@ -61,6 +39,17 @@
* $FreeBSD$
*/
#pragma once
#include <stdint.h>
/*
* This is a compatibility header for <endian.h>.
* In xtensa-newlib distribution it is located in <machine/endian.h>
* but most program expect to be plain <endian.h>.
*/
#include <machine/endian.h>
/*
* General byte order swapping functions.
*/
@ -209,4 +198,3 @@ le64enc(void *pp, uint64_t u)
le32enc(p, (uint32_t)(u & 0xffffffffU));
le32enc(p + 4, (uint32_t)(u >> 32));
}
#endif /* XTENSA_COMPAT_ENDIAN_H_INCLUDED */

View File

@ -1,21 +1,24 @@
// Copyright 2018 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.
#ifndef _ESP_PLATFORM_SYS_UIO_H_
#define _ESP_PLATFORM_SYS_UIO_H_
/*
* SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdint.h>
#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
#endif
struct iovec;
int writev(int s, const struct iovec *iov, int iovcnt);
ssize_t readv(int fd, const struct iovec *iov, int iovcnt);
#endif // _ESP_PLATFORM_SYS_UIO_H_
#ifdef __cplusplus
}
#endif

View File

@ -1967,7 +1967,6 @@ components/newlib/heap.c
components/newlib/locks.c
components/newlib/newlib_init.c
components/newlib/platform_include/assert.h
components/newlib/platform_include/endian.h
components/newlib/platform_include/errno.h
components/newlib/platform_include/esp_newlib.h
components/newlib/platform_include/net/if.h
@ -1981,7 +1980,6 @@ components/newlib/platform_include/sys/reent.h
components/newlib/platform_include/sys/select.h
components/newlib/platform_include/sys/termios.h
components/newlib/platform_include/sys/time.h
components/newlib/platform_include/sys/uio.h
components/newlib/platform_include/sys/un.h
components/newlib/platform_include/sys/unistd.h
components/newlib/platform_include/sys/utime.h