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>
17 lines
468 B
C
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_ */
|