posix: fs: declare _POSIX_C_SOURCE in a consistent way

Declare _POSIX_C_SOURCE in a consistent way for both the
posix/options library as well as the tests/posix/fs
testsuite.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This commit is contained in:
Chris Friedt 2025-01-03 13:04:41 -05:00 committed by Benjamin Cabé
commit fa841fe7bd
4 changed files with 4 additions and 6 deletions

View file

@ -173,3 +173,5 @@ zephyr_library_include_directories(
) )
zephyr_library_property(ALLOW_EMPTY TRUE) zephyr_library_property(ALLOW_EMPTY TRUE)
zephyr_library_compile_options(-U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=200809L)

View file

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

View file

@ -6,3 +6,5 @@ project(fs)
FILE(GLOB app_sources src/*.c) FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources}) target_sources(app PRIVATE ${app_sources})
target_compile_options(app PRIVATE -U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=200809L)

View file

@ -4,9 +4,6 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200809L
#include <stdio.h> #include <stdio.h>
#include <fcntl.h> #include <fcntl.h>
#include <zephyr/posix/unistd.h> #include <zephyr/posix/unistd.h>