zephyr/lib/libc/minimal/include/fcntl.h
Chris Friedt 8659e2f69e libc: minimal: include: move fcntl.h to posix
The `fcntl.h` header has never been a part of ISO C so move it to
`include/zephyr/posix`.

To ensure a smooth migration, a header was left in
`lib/libc/minimal/include` that prints a deprecation warning.

Users should either include `<zephyr/posix/fcntl.h>` or switch to
`CONFIG_POSIX_API=y`.

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

17 lines
468 B
C

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