Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/libc/picolibc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ if(NOT CONFIG_PICOLIBC_USE_MODULE)
# Use picolibc provided with the toolchain

zephyr_compile_options(--specs=picolibc.specs)
zephyr_compile_definitions(_POSIX_C_SOURCE=200809)
zephyr_libc_link_libraries(--specs=picolibc.specs c -lgcc)
if(CONFIG_PICOLIBC_IO_FLOAT)
zephyr_compile_definitions(PICOLIBC_DOUBLE_PRINTF_SCANF)
Expand Down
6 changes: 4 additions & 2 deletions tests/lib/c_lib/src/test_strerror.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
* SPDX-License-Identifier: Apache-2.0
*/

#ifdef CONFIG_NEWLIB_LIBC
/*
* strerror_r is not part of the Zephyr C API. Define this so that a C
* library which supports POSIX will declare it.
*/
#define _POSIX_C_SOURCE 200809
#endif

#include <errno.h>
#include <string.h>
Expand Down