mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-10 09:53:13 -04:00
Add getcwd() for getting the current working directory. The behaviour matches what musl is doing except for one important difference: If the passed buf is NULL musl (and glibc) uses a big buffer on the stack and that is then strdup()'d and returned. According to the man page for getcwd() this is a glibc extension and I don't think we need it in nolibc. Signed-off-by: Daniel Palmer <daniel@thingy.jp> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260702085101.3304547-2-daniel@thingy.jp Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>