<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/include/nolibc/dirent.h, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2025-12-18T12:59:28Z</updated>
<entry>
<title>tools/nolibc/dirent: avoid errno in readdir_r</title>
<updated>2025-12-18T12:59:28Z</updated>
<author>
<name>Benjamin Berg</name>
<email>benjamin.berg@intel.com</email>
</author>
<published>2025-09-24T14:20:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=43a2587f382d2298d975f06e0f8a6eeb1ba14507'/>
<id>urn:sha1:43a2587f382d2298d975f06e0f8a6eeb1ba14507</id>
<content type='text'>
[ Upstream commit 4ada5679f18dbbe92d87c37a842c3368e6ab5e4a ]

Using errno is not possible when NOLIBC_IGNORE_ERRNO is set. Use
sys_lseek instead of lseek as that avoids using errno.

Fixes: 665fa8dea90d ("tools/nolibc: add support for directory access")
Signed-off-by: Benjamin Berg &lt;benjamin.berg@intel.com&gt;
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools/nolibc: include nolibc.h early from all header files</title>
<updated>2025-05-21T13:31:50Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2025-04-24T11:48:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3785289f97e2118b157332ffaae9fd2ec71237c8'/>
<id>urn:sha1:3785289f97e2118b157332ffaae9fd2ec71237c8</id>
<content type='text'>
Inclusion of any nolibc header file should also bring all other headers.
On the other hand it should also be possible to include any nolibc header
files
in any order.

Currently this is implemented by including the catch-all nolibc.h after the
headers own definitions.
This is problematic if one nolibc header depends on another one.
The first header has to include the other one before defining any symbols.
That in turn will include the rest of nolibc while the current header has
not defined anything yet. If any other part of nolibc depends on
definitions from the current header, errors are encountered.
This is already the case today. Effectively nolibc can only be included in
the order of nolibc.h.

Restructure the way "nolibc.h" is included.
Move it to the beginning of the header files and before the include guards.
Now any header will behave exactly like "nolibc.h" while the include
guards prevent any duplicate definitions.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://lore.kernel.org/r/20250424-nolibc-header-check-v1-2-011576b6ed6f@linutronix.de
</content>
</entry>
<entry>
<title>tools/nolibc: move open() and friends to fcntl.h</title>
<updated>2025-04-19T12:22:21Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2025-04-16T12:06:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ecc091d93a221b8541c94aeeeb741e9e1c39073f'/>
<id>urn:sha1:ecc091d93a221b8541c94aeeeb741e9e1c39073f</id>
<content type='text'>
This is the location regular userspace expects these definitions.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://lore.kernel.org/r/20250416-nolibc-split-sys-v1-3-a069a3f1d145@linutronix.de
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
<entry>
<title>tools/nolibc: properly align dirent buffer</title>
<updated>2025-04-19T12:18:01Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-04-19T10:46:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0e75768ba24d669dbf76530e21fd51cfe2fbd2a9'/>
<id>urn:sha1:0e75768ba24d669dbf76530e21fd51cfe2fbd2a9</id>
<content type='text'>
As byte buffer is overlaid with a 'struct dirent64'.
it has to satisfy the structs alignment requirements.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Fixes: 665fa8dea90d ("tools/nolibc: add support for directory access")
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://lore.kernel.org/r/20250419-nolibc-ubsan-v2-4-060b8a016917@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: add support for directory access</title>
<updated>2025-02-09T15:46:50Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2025-02-09T13:25:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=665fa8dea90d9fbc0e7137c7e1315d6f7e15757e'/>
<id>urn:sha1:665fa8dea90d9fbc0e7137c7e1315d6f7e15757e</id>
<content type='text'>
Add an implementation for directory access operations.
To keep nolibc itself allocation-free, a "DIR *" does not point to any
data, but directly encodes a filedescriptor number, equivalent to "FILE *".
Without any per-directory storage it is not possible to implement
readdir() POSIX confirming. Instead only readdir_r() is provided.
While readdir_r() is deprecated in glibc, the reasons for that are
not applicable to nolibc.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Link: https://lore.kernel.org/r/20250209-nolibc-dir-v2-2-57cc1da8558b@weissschuh.net
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
</feed>
