tests, samples: Define _POSIX_C_SOURCE where needed

Various tests and samples use POSIX-only functions. Define _POSIX_C_SOURCE
to ensure they are visible.

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard 2024-09-12 15:15:41 -07:00 committed by Carles Cufí
commit 962e42cf1d
4 changed files with 8 additions and 2 deletions

View file

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

View file

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