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>
This commit is contained in:
Chris Friedt 2022-11-16 17:02:02 -05:00 committed by Stephanos Ioannidis
commit 6f4e96bc24
6 changed files with 68 additions and 43 deletions

View file

@ -11,7 +11,7 @@
#include <zephyr/posix/dirent.h>
#include <string.h>
#include <zephyr/sys/fdtable.h>
#include <sys/stat.h>
#include <zephyr/posix/sys/stat.h>
#include <fcntl.h>
#include <zephyr/fs/fs.h>