From 6285f0881ec68034399d13552f7243e69e6e37bf Mon Sep 17 00:00:00 2001 From: Thomas Weißschuh Date: Thu, 19 Mar 2026 17:20:17 +0100 Subject: tools/nolibc: rename sys_foo() functions to _sys_foo() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sys_foo() naming scheme used by the syscall wrappers may collide with application symbols. Especially as 'sys_' is an obvious naming scheme an application may choose for its own custom systemcall wrappers. Avoid these conflicts by using an leading underscore which moves the names into the implementation's namespace. This naming scheme was chosen over a '__nolibc_' prefix, as these functions are not an implementation detail but a documented interface meant to be used by applications. While this may break some existing users, adapting them should be straightforward. Given that nolibc is most-likely vendored, no unexpected breakage should happen. No in-tree users are affected. These conflicts happen when compiling some of the kernel selftests with nolibc. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://patch.msgid.link/20260319-nolibc-namespacing-v1-1-33c22eaddb5e@weissschuh.net --- tools/include/nolibc/dirent.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/include/nolibc/dirent.h') diff --git a/tools/include/nolibc/dirent.h b/tools/include/nolibc/dirent.h index 61a122a60327..4e02ef25e72d 100644 --- a/tools/include/nolibc/dirent.h +++ b/tools/include/nolibc/dirent.h @@ -73,7 +73,7 @@ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) fd = ~i; - ret = sys_getdents64(fd, ldir, sizeof(buf)); + ret = _sys_getdents64(fd, ldir, sizeof(buf)); if (ret < 0) return -ret; if (ret == 0) { @@ -86,7 +86,7 @@ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) * readdir() can only return one entry at a time. * Make sure the non-returned ones are not skipped. */ - ret = sys_lseek(fd, ldir->d_off, SEEK_SET); + ret = _sys_lseek(fd, ldir->d_off, SEEK_SET); if (ret < 0) return -ret; -- cgit v1.2.3