Skip to content

Commit 270459f

Browse files
committed
libc: remove POSIX_TIMERS dep from COMMON_LIBC_TIME
remove POSIX_TIMERS dependency from COMMON_LIBC_TIME. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
1 parent f2c37c4 commit 270459f

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

cmake/toolchain/armclang/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ choice LIBC_IMPLEMENTATION
1616
config ARMCLANG_STD_LIBC
1717
bool "ARM Compiler C library"
1818
select COMMON_LIBC_STRNLEN
19-
select COMMON_LIBC_TIME if POSIX_TIMERS
19+
select COMMON_LIBC_TIME
2020
help
2121
Use the full Arm Compiler runtime libraries.
2222
A reduced Zephyr minimal libc will be used for library functionality

doc/develop/languages/c/common_libc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Time function
1212
*************
1313

1414
This provides an implementation of the standard C function, :c:func:`time`,
15-
relying on the Zephyr function, :c:func:`clock_gettime`. This function can
15+
relying on the Zephyr function, :c:func:`sys_clock_gettime`. This function can
1616
be enabled by selecting :kconfig:option:`COMMON_LIBC_TIME`.
1717

1818
Dynamic Memory Management

lib/libc/minimal/Kconfig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ config MINIMAL_LIBC_RAND
3737

3838
config MINIMAL_LIBC_TIME
3939
bool "Time functions"
40-
select COMMON_LIBC_TIME if POSIX_TIMERS
40+
select COMMON_LIBC_TIME
4141
select POSIX_C_LANG_SUPPORT_R
4242
select COMMON_LIBC_GMTIME_R
4343
select COMMON_LIBC_ASCTIME
@@ -47,9 +47,6 @@ config MINIMAL_LIBC_TIME
4747
help
4848
Enable time() and gmtime_r() for the minimal libc.
4949

50-
time() requires CONFIG_POSIX_TIMERS=y because it relies on the POSIX
51-
clock_gettime() function.
52-
5350
In order to make use of the non-reentrant gmtime(), it is necessary
5451
to set CONFIG_MINIMAL_LIBC_NON_REENTRANT_FUNCTIONS=y.
5552

0 commit comments

Comments
 (0)