2056 Commits

Author SHA1 Message Date
Magne Værnes
c2011b9d0f lib: posix: add missing getopt_long guard
Added ifdef guard (CONFIG_GETOPT_LONG) around the functions in
getopt_shim.c that requires getopt_long implementation.

Signed-off-by: Magne Værnes <magne.varnes@nordicsemi.no>
2026-01-21 17:07:49 +01:00
Pieter De Gendt
f344ab6b98 cobs: Introduce streaming
This commit does:

- Introduce COBS streaming
- Refactor custom delimiter with XOR'ed encoded data
- Update tests

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-01-21 17:06:04 +01:00
Alberto Escolar Piedras
4d0852b005 lib/midi2: Do not add to include path always
Do not add this folder to the include path when this component is not
enabled. As that creates noise and slows down builds.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-01-21 13:03:38 +00:00
Chris Friedt
c2cad209a3 posix: xsi_streams: add tc-provides-xsi-streams kconfig option
Enable the toolchain to provide the XSI_STREAMS Option Group.

Signed-off-by: Chris Friedt <chris@fr4.co>
2026-01-20 13:24:51 +00:00
Chris Friedt
25c2aaef9b posix: xsi: streams: deprecate CONFIG_XOPEN_STREAMS (again)
CONFIG_XOPEN_STREAMS does not follow the pattern of other XSI Option
Groups, where the Option Group name is not the same as the feature
test macro that indicates it is supported by the implementation.

Deprecate CONFIG_XOPEN_STREAMS and rename it to CONFIG_XSI_STREAMS.

For more information, please see
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/\
V1_chap02.html#tag_02_01_05_09

Signed-off-by: Chris Friedt <chris@fr4.co>
2026-01-20 13:24:51 +00:00
Jamie McCrae
d94ed7b316 lib: os: Fix ZVFS leaking without being enabled
Fixes this define leaking into all application source files when
the feature is not even enabled

Co-authored-by: Chris Friedt <cfriedt@tenstorrent.com>
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-01-09 14:23:25 -06:00
Marco Casaroli
a78db0f8a9 posix: eventfd: ignore k_condvar_broadcast result
k_condvar_broadcast does not error. It returns the number of
woken threads on success. We should not assert any value.

Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
2026-01-08 08:31:56 -05:00
Marco Casaroli
aa607f9b0a posix: eventfd: fix deadlock with POSIX API
When eventfd is used through read(2) and write(2), the mutex is
already locked from the fdtable implementation. So we remove the
usage of the mutex from the zvfs_eventfd_*_op functions, as it is
already managed by fdtable.

However, when zvfs_eventfd_{read,write} are used, no fdtable layer
is used and we shuld call the _op function with the mutex locked
(the same behavior as with fdtable), so these functions should
manage the mutex. We add it there.

Fixes #99234

Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
2026-01-08 08:31:56 -05:00
Hubert Guan
0b57af0c94 lib: multi-heap: Add shared_multi_heap_realloc
Add the function shared_multi_heap_realloc to reallocate memory blocks
in shared multi-heaps.

Signed-off-by: Hubert Guan <hubertyguan@gmail.com>
2026-01-07 14:07:52 +01:00
Samuel Coleman
3332a97295 lib: cbprintf: perform length calculation dry-run.
C99 § 7.19.6.5 defines `snprintf`. According to ¶ 2:

> If `n` is zero, nothing is written, and `s` may be a null pointer.

And according to § 7.19.6.12 ¶ 2:

> The `vsnprintf` function is equivalent to `snprintf` (...)

However, prior to this change, `vsnprintfcb` (and indirectly, `snprintfcb`)
unconditionally null-terminates the output buffer.

This fixes #48394, which was auto-closed without actually being fixed.

Co-authored-by: Adrien Lessard <adrien.lessard@rbr-global.com>
Signed-off-by: Samuel Coleman <samuel.coleman@rbr-global.com>
2026-01-07 10:20:22 +01:00
Chris Friedt
3c855aeddd zvfs: eventfd: count eventfd file descriptors for fdtable size
Previously, eventfd file descriptors were not being counted against the
required size for the global file descriptor table, which would result
in the function `eventfd()` (and `zvfs_eventfd()`) failing due to
insufficient resources.

Signed-off-by: Chris Friedt <chris@fr4.co>
2026-01-06 19:14:47 +00:00
Keith Short
4d81bdb667 posix: c_lib_ext: fnmatch: fix llvm warning
The tolower() function takes an int parameter. LLVM compilers generate a
warning if a char is passed instead.

Signed-off-by: Keith Short <keithshort@google.com>
2026-01-02 09:56:45 +00:00
Chris Friedt
de2d0c9563 posix: c_lib_ext: fnmatch: fix character class support
A couple of tests were inconsistent with glibc and picolibc.

Significant rework done to the `fnmatch()` implementation which included
refreshing that and the `rangematch()` implementations from commit

0a3b2e376d150258c8294c12a85bec99546ab84b

in https://github.com/lattera/freebsd

Removed `match_posix_class()` and implemented that functionality as
`rangematch_cc()`, which uses 64-bit integer comparison for matching
`[:alnum:]` et al instead of string comparison. That likely only works
for the "C" locale.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Signed-off-by: Harun Spago <harun.spago.code@gmail.com>
2025-12-24 12:50:31 -05:00
Chris Friedt
637080e7ec posix: c_lib_ext: fnmatch: fix escape-oriented regression
A regression in 936d0278bd introduced a
subtle bug in the way that escaped expressions were handled.

The regression originated with the assumption that test data (originally
adapted from a 3rd-party testsuite) was correct when it was in fact
flawed.

Specifically, `fnmatch("[[?*\\]", "\\", 0)` should fail (`FNM_NOMATCH`),
since the "\\" sequence (a single backslash after compilation) escapes
the following ']' character, thus leaving the bracket expression
incomplete.

As @keith-packard  has pointed out,
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/\
V3_chap02.html#tag_18_13_01 says that a bracket expression is only
interpreted as a bracket expression, when a proper bracket expression
is formed.

Therefore, the pattern is interpreted as the sequence
`'['`, `'['`, `'?'`, `*` (wildcard), `']'` and the call should return
`FNM_NOMATCH` to indicate failure rather than 0 to indicate success.

Added new test cases from #98827 and some commentary for subsequent
reviewers.

This change does not completely fix #55186 but is related to it.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-12-24 12:50:31 -05:00
Emil Hammarstrom
12986286de lib: hash: Ensure OA/LP hmap inserts don't return tombstones
According to the hashmap interface specification sys_hashmap_remove will
"Erase the entry associated with key `key`, if one exists"

If a rehash is performed OA/LP will return 1 and no old_value for
sys_hashmap_insert.

If a rehash is NOT performed OA/LP will return 0 and a stale old_value for
sys_hashmap_insert even though the user requested the entry for that key to
be removed.

This patch makes OA/LP not return the value of tombstoned entries.

Signed-off-by: Emil Hammarstrom <emil.hammarstrom1@assaabloy.com>
2025-12-18 12:09:36 +00:00
Jordan Yates
1d92d0b5ff utils: timeutil: option to disable clock skew
Accurately applying clock skew correction in
`timeutil_sync_ref_from_local` and `timeutil_sync_local_from_ref`
requires double-precision floating point operations. If this is the only
usage of double precision logic in the build, but clocks skews are not
used, this can be a significant ROM overhead. Disabling this option can
save ~2.4 kB of ROM.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-12-18 09:24:34 +01:00
Sylvio Alves
f8d2e00a0e includes: remove duplicated entries in zephyr-tree
Remove duplicated #include directives within the same
preprocessor scope across the Zephyr tree.

Duplicates inside different #ifdef branches are preserved
as they may be intentional.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-12-17 13:57:38 -05:00
Bjarki Arge Andreasen
66dbe436bd lib: os: poweroff: Disable ZLIs before poweroff
We currently only disable "normal" IRQs with irq_lock(). This is not
sufficient if ZLIs are enabled, as even though they are supposed to
be "above" the kernel, they must not interrupt the poweroff procedure.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-12-14 11:14:45 +00:00
Bjarki Arge Andreasen
7c72e3cc42 lib: os: reboot: Disable ZLIs before reboot
We currently only disable "normal" IRQs with irq_lock(). This is not
sufficient if ZLIs are enabled, as even though they are supposed to
be "above" the kernel, they must not interrupt the reboot procedure.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-12-14 11:14:45 +00:00
Benjamin Cabé
bef6cdb127 sys: util: add sys_ prefix to SIGN, gcd, and lcm utils
As per our naming conventions for public symbols, these utility functions
and macros should be prefixed with "sys_".

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-12-12 04:58:14 -05:00
Vladislav Kulikov
286cefbb30 smf: improve sibling transitions speed
Sibling transitions are now detected in smf_set_state() when source and
destination share the same parent, removing the need for states to flag
the sibling transition explicitly.

Restore include/zephyr/smf.h and lib/smf/Kconfig to match main so this
change only carries the functional update in lib/smf/smf.c, and add a
micro-benchmark test. For accurate statistics, run the test on a board.

Micro-benchmark setup
- Board: NUCLEO-F746ZG (STM32F746, ~192 MHz)
- 200000 iterations per state transition
- Simple HSM (letters are nodes; R is root):

=== SMF transition micro-benchmark ===
        R
      /   \
     A     B
    / \   / \
   C   D E   F
  / \         \
 G   H         J

Current smf_set_state:
======================
Sibling Transitions
(A->B) : 459 cycles/transition (2390 ns)
(C->D) : 482 cycles/transition (2510 ns)
(G->H) : 522 cycles/transition (2718 ns)

Other Transitions
(G<->G) : 237 cycles/transition (1234 ns)
(C->G) : 343 cycles/transition (1786 ns)
(A->H) : 452 cycles/transition (2354 ns)
(G->D) : 651 cycles/transition (3390 ns)
(D->E) : 752 cycles/transition (3916 ns)
(J->D) : 893 cycles/transition (4651 ns)
(J->G) : 1077 cycles/transition (5609 ns)

New smf_set_state:
==================
Sibling Transitions
(A->B) : 356 cycles/transition (1854 ns)(22% faster)
(C->D) : 356 cycles/transition (1854 ns)(26% faster)
(G->H) : 356 cycles/transition (1854 ns)(32% faster)

Other Transitions
(G<->G) : 258 cycles/transition (1343 ns)(9% slower)
(C->G) : 356 cycles/transition (1854 ns)(4% slower)
(A->H) : 464 cycles/transition (2416 ns)(3% slower)
(G->D) : 707 cycles/transition (3682 ns)(9% slower)
(D->E) : 797 cycles/transition (4151 ns)(6% slower)
(J->D) : 970 cycles/transition (5052 ns)(9% slower)
(J->G) : 1157 cycles/transition (6026 ns)(8% slower)

This change makes sibling transitions
deterministic and cheaper (356 cycles on nsim),
at the cost of a small increase for deeper/LCA
transitions (~7–9%). This is a net win for state machines
that mostly hop between siblings.

Signed-off-by: Vladislav Kulikov <vlad_kulikov_c@pm.me>
2025-12-08 22:27:54 -05:00
Fabio Baltieri
4ab97f565e sys: getopt: drop the gcd definition
This is available in util.h since 646f255373 and the existing one
creates a collision and build breakage. Just drop it.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-12-08 22:26:48 -05:00
Chris Friedt
de917358aa libc: minimal: add missing ctype.h functions
Add the functions below to the minimal libc ctype.h since they are
missing, and are required as of C89 (C99 for `isblank()`)

* `isblank()`
* `islower()`
* `ispunct()`

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-12-03 11:41:43 +01:00
Chris Friedt
6b6a259b78 libc: minimal: ctype: remove unnecessary casts
A review comment in the PR below requested that unnecessary casts were
removed from ctype.h in the PR below.

https://github.com/zephyrproject-rtos/zephyr/pull/99451

Tested with manual compilation in C and C++ mode with the arguments
```shell
gcc -Wconversion -Werror -Wall -Wextra -Wint-conversion
clang -Wconversion -Werror -Wall -Wextra -Wint-conversion
gcc -Wconversion -Werror -Wall -Wimplicit--Wextra
clang++ -Wconversion -Werror -Wall -Wextra
```

and also with `-- -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y`

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-12-03 11:41:43 +01:00
Chris Friedt
6b393c7106 libc: minimal: ctype: express ctype limits in more direct fashion
Based on review feedback, it was suggested to express ctype
character checks in a more direct fashion, rather than using
arithmetic, and allow the compiler to optimize as it sees fit.

https://github.com/zephyrproject-rtos/zephyr/pull/99451#\
discussion_r2530339430

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-12-03 11:41:43 +01:00
Chris Friedt
8a2442fadd libc: minimal: ctype: use unsigned int instead of unsigned
The "check warns" workflow in CI warned over the use of `unsigned` as a
shorthand for `unsigned int` in several locations in
`lib/libc/minimal/include/ctype.h`.

```
 UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
File:lib/libc/minimal/include/ctype.h
```

Adjust `unsigned` to `unsigned int` to avoid linter warnings.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-12-03 11:41:43 +01:00
Peter van der Perk
819955b52c kernel: thread: mark return undefined in z_thread_entry using DWARF
Add DWARF hint to handle z_thread_entry correctly
in debuggers. This function starts a new thread and never returns.
Use `.cfi_undefined` so DWARF-based unwinding does not rely on return.
Without this, unwinding may follow a bogus return address, leading to
invalid memory reads and potential bus faults during backtrace.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2025-11-20 08:59:42 -05:00
Vladislav Kulikov
0b3ec11762 smf: make while conditions MISRA 14.4 compliant
Replace pointer-as-condition checks, with explicit != NULL comparisons.
Which satisfies MISRA-C:2012 Rule 14.4 (controlling expressions shall be
essentially Boolean).

Signed-off-by: Vladislav Kulikov <vlad_kulikov_c@pm.me>
2025-11-20 06:03:31 -05:00
Fei Wang
8af60c6239 lib: os: mpsc_pbuf: fix potential semaphore wait forever
One thread calls mpsc_pbuf_alloc to produce data, which invokes
add_skip_item and steps into k_sem_take.

Another thread calls mpsc_pbuf_claim to consume data. In this condition,
mpsc_pbuf_claim has only small remaining space and needs to call rd_idx_inc
to reserve space, but there is still no data available.

The consumer should call k_sem_give to wake mpsc_pbuf_alloc again,
so the producer can allocate space and continue producing data.

Without this wake-up, the producer thread may wait forever in
k_sem_take, leading to a deadlock situation.

Signed-off-by: Fei Wang <fei.wang@jaguarmicro.com>
2025-11-19 15:56:39 -05:00
Alberto Escolar Piedras
72090b73ef lib/utils/getopt: Fix trivial issues detected by SonarCloud
Fix uncontroversional issues detected by SonarCloud, whose fixes are
trivial, and improve code readability.

This commit fixes multiple sonar cloud detected issues like:
"Give names to the parameters of this function prototype."
"Declare the variable "i"/"j" inside the loop"
"Remove this empty statement"

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-11-19 15:53:28 -05:00
Jukka Rissanen
d164f8b55d lib: posix: Add shim for getopt API
Allow user to use the new sys_getopt API via the old non-Posix
compliant getopt API. This is a temporary solution and the shim
will be deprecated and eventually removed at some point.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-11-18 10:46:29 -05:00
Jukka Rissanen
22f9ef0a33 sys: getopt: Rename getopt to sys_getopt to avoid conflicts with Posix
Summary:

As Zephyr getopt is not really compatible with Posix getopt, rename
Zephyr getopt to sys_getopt.

Background:

Zephyr getopt module was introduced in #31356 to be used by the shell.
Zephyr's getopt is not the standard one. It has multiple APIs which make
it more suited for a system like Zephyr where different components may
want to use it for different purposes. Including APIs to init it,
get and set its internal state etc.
Several Zephyr modules (shell, net, wifi, ztest) use this getopt with
these special APIs. The getopt module is bundled in the POSIX
compatibility API subsystem (CONFIG_POSIX_C_LIB_EXT).

Problem description:

As it is not the standard getopt(), no C library can possibly provide
a Zephyr compatible version (even if such C library were to provide a
standard getopt()). As it is bundled in Zephyr's POSIX API in
CONFIG_POSIX_C_LIB_EXT), multiple components that depend on it are
selecting CONFIG_POSIX_C_LIB_EXT. Zephyr core components should not
depend on the POSIX API in this way.

Changes done in this commit:

Rename the getopt*() APIs to sys_getopt*() and move them into a module
under lib/utils with its own Kconfig option to enable it.
Zephyr's users are changed to use this new component.
The POSIX subsystem can continue providing getopt() by calling the new
sys_getopt() and in that way retain backwards compatibility for external
users.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-11-18 10:46:29 -05:00
Jakub Klimczak
3c4277391a zvfs: Remove test for static initialization of stdin, stdout, stderr
This removes a function that created a new mutex and conditional variable
and used memcpy() to compare them with ones in a given fdtable entry.
Since those struct members are initialized statically, this test doesn't
serve much of a purpose anymore. Moreover, padding bytes inside structs
are technically not required to be zero, so these memcpy() calls caused
SonarQube to complain.

Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
2025-11-18 08:12:19 -05:00
Jakub Klimczak
f16f3f641e zvfs: Move fdtable into ZVFS
The file descriptor table is used in every area that expects to work on
files through descriptor indices. It can only be operated on through
functions whose names indicate a relationship with ZVFS (`zvfs_*fd*`).
The integer file descriptor mechanism shouldn't be separate from ZVFS.
This will make cooperation between different file access APIs much
simpler. This commit also makes preparations for the fdtable becoming
optional.

Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
2025-11-18 08:12:19 -05:00
Jakub Klimczak
735f0d7363 zvfs: Move file operations from POSIX into ZVFS
This commit moves all operations on single files into ZVFS and makes the
POSIX subsystem call into ZVFS to perform them. It was necessary to define
a `struct zvfs_stat` to avoid a dependency cycle. Functions used
internally for file i/o operations are publicised since they won't require
any changes between various subsystems. This allows ZVFS to actually
fulfill its purpose of facilitating cooperation of different file APIs.

Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
2025-11-18 08:12:19 -05:00
BUDKE Gerson Fernando
0ddb8e40f2 lib: json: Fix escape sequence unescaping during decoding
Fix the JSON library to properly unescape sequences during decoding.
Previously, escape sequences like \n, \t, \" etc were validated but
not converted back to their actual character representations during
decoding, causing backslash duplication with each encode/decode cycle.

This fix modifies decode_string_buf() to properly handle escape
sequence unescaping and ensures strings maintain their original
content across multiple encode/decode cycles.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-11-08 10:22:50 +02:00
Anas Nashif
4e9a4e385a cpu_load: rename conflicting API
We have two places defining cpu_load_get() and trying to the same thing,
one is a core kernel feature supported on all architecture, the other is
part of debug, requires tracing and supported only on a subset of
architectures. Both deliver different results and accuracy.

While we figure our how to merge those into one API and with the
advanatges of both, rename the API so there is no confusion about what
is being used.

Fixes #97845

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-11-07 10:27:50 +02:00
Vlad Kulikov
8b31d2cad3 smf: simplify get_child_of() loop and rename local to 'state'
Replace the open-ended while(true) with a null-terminated parent walk.
Improves readability, behavior is unchanged.

Signed-off-by: Vlad Kulikov <vlad_kulikov_c@pm.me>
2025-11-04 13:59:52 -05:00
Anas Nashif
303af992e5 style: fix 'if (' usage in cmake files
Replace with 'if(' and 'else(' per the cmake style guidelines.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-29 11:44:13 +02:00
Nulliu Z
a7f3c1b5e3 ib: multi_heap: fix out-of-bounds array access
Add bounds check to prevent accessing heaps array with index=-1
when the address parameter is NULL or too small.

Return NULL in such cases to match the API specification.

Signed-off-by: Nulliu Z <zophaisina@outlook.com>
2025-10-28 11:52:46 +02:00
Jeppe Odgaard
7d7a317fa0 lib: heap: return -ENOMEM if heap_array is full
Replace -EINVAL which indicates an invalid input parameter.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-10-24 13:21:57 -04:00
Fabio Baltieri
700a1a5a28 lib, kernel: use single evaluation min/max/clamp
Replace all in-function instances of MIN/MAX/CLAMP with the single
evaluation version min/max/clamp.

There's probably no race conditions in these files, but the single
evaluation ones save a couple of instructions each so they should save
few code bytes and potentially perform better, so they should be
preferred in general.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-10-24 01:10:40 +03:00
Vladislav Kulikov
ffd1403093 lib: smf: rename share_parent() to is_descendant_of()
Make the name more descriptive.

Signed-off-by: Vladislav Kulikov <vlad_kulikov_c@pm.me>
2025-10-23 16:00:50 -04:00
Valerio Setti
fc422beb68 lib: uuid: replace legacy crypto support with PSA API
Legacy crypto support is going to be removed in the next Mbed TLS release
(which will be named TF-PSA-Crypto for the crypto support) so this
commit transitions UUID library from legacy crypto to PSA API.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-23 11:42:11 +03:00
Anas Nashif
24e094ef5e lib: move cpu_load into lib/os
Move cpu_load to lib/os, as this functionality on its own does not
justify being a subsystem on its own.

Fixes #95498

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-22 09:02:38 +02:00
Jukka Rissanen
5d4e4e5018 lib: posix: device_io: Add standard file descriptor sizes
Make sure we always allocate space for stdin, stdout and stderr file
descriptors if Posix device io option is enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-10-21 17:22:03 +03:00
Jukka Rissanen
1cfdf7c8d1 lib: Introduce a way to set minimum file descriptors count
Instead of user trying to figure out what is the amount of file /
socket descriptors in the system, let the various subsystems etc.
specify their need using a Kconfig option. The build system will
then add these smaller values together and set a suitable file
descriptor count in the system.

This works the same way as the heap size calculation introduced
in commit 3fbf12487c

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-10-21 17:22:03 +03:00
Benjamin Cabé
312688d7ea Revert "posix: xsi: streams: deprecate CONFIG_XOPEN_STREAMS"
This reverts commit b762a43738
which was merged without enough time in review.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-10-20 11:28:54 -04:00
Chris Friedt
b762a43738 posix: xsi: streams: deprecate CONFIG_XOPEN_STREAMS
CONFIG_XOPEN_STREAMS does not follow the pattern of other XSI Option
Groups, where the Option Group name is not the same as the feature
test macro that indicates it is supported by the implementation.

Deprecate CONFIG_XOPEN_STREAMS and rename it to CONFIG_XSI_STREAMS.

For more information, please see
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/\
V1_chap02.html#tag_02_01_05_09

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-10-19 20:53:48 -04:00
Chris Friedt
9f13274c00 libc: indicate timeval is defined
In order to avoid multiple definition errors, indicate that struct
timeval is declared.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-10-18 20:33:57 -04:00