zephyr/lib/libc/minimal/include/sys/stat.h
Chris Friedt 6f4e96bc24 libc: minimal: include: move sys/stat.h to posix
The `sys/stat.h` header has never been a part of ISO C so move it
to `zephyr/include/posix/sys/`.

To ensure a smooth migration, leave a stub header in
`lib/libc/minimal/include/sys/` that prints a deprecation warning
suggesting developers either include `<zephyr/posix/sys/stat.h>`
or use `CONFIG_POSIX_API=y`.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-01-10 09:02:21 +09:00

17 lines
479 B
C

/*
* Copyright (c) 2022 Meta
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_SYS_STAT_H_
#define ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_SYS_STAT_H_
#ifndef CONFIG_POSIX_API
#pragma message("#include <sys/stat.h> without CONFIG_POSIX_API is deprecated. " \
"Please use CONFIG_POSIX_API or #include <zephyr/posix/sys/stat.h>")
#endif
#include <zephyr/posix/sys/stat.h>
#endif /* ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_SYS_STAT_H_ */