posix: Define _POSIX_C_SOURCE to gain access to POSIX functions

options/fs.c and options/timer.c both use POSIX-only functions. To ensure
those symbols are visible from the underlying C library, define
_POSIX_C_SOURCE.

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard
2024-09-12 13:29:27 -07:00
committed by Carles Cufí
parent a7cfe31731
commit 98debeea78
2 changed files with 4 additions and 0 deletions

View File

@@ -4,6 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200809L
#include <errno.h>
#include <zephyr/kernel.h>
#include <limits.h>

View File

@@ -4,6 +4,8 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200809L
#include <errno.h>
#include <zephyr/kernel.h>