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

@ -15,10 +15,8 @@
* it guarantee that ALL functionality provided is working correctly.
*/
#if defined(CONFIG_NATIVE_LIBC)
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200809L
#endif
#include <zephyr/kernel.h>
#include <zephyr/sys/__assert.h>