newlib: Fix header issues with C++ guards and implicit inclusion

* Added C++ sentinels if missed
* Used #pragma once, removed macro's with leading underscores
* Updated copyright checker to allow "BSD-2-Clause-FreeBSD AND
Apache-2.0" for newlib files
* Fixed minor compilation issues/implicit inclusions
This commit is contained in:
David Cermak
2022-07-04 11:53:42 +02:00
parent 48c5b45e99
commit adb79a4852
8 changed files with 48 additions and 16 deletions
@@ -4,20 +4,19 @@
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#ifndef _ESP_SYS_UNISTD_H
#define _ESP_SYS_UNISTD_H
#include <sys/types.h>
#include_next <sys/unistd.h>
#ifdef __cplusplus
extern "C" {
#endif
#include_next <sys/unistd.h>
int truncate(const char *, off_t __length);
int gethostname(char *__name, size_t __len);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_UNISTD_H */