mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Fix Linux getcwd for long paths
The getcwd syscall (so far?) can only handle path up to one page in size. There is no limit about directory hierarchy depth, though, and the POSIX getcwd is supposed to handle this. In that case fall back to the generic getcwd. Additionally, optimize the generic getcwd to use openat when possible to change the asymptotic performance from O(N^2) to O(n).
This commit is contained in:
1
sysdeps/unix/sysv/linux/dl-getcwd.c
Normal file
1
sysdeps/unix/sysv/linux/dl-getcwd.c
Normal file
@ -0,0 +1 @@
|
||||
#include "getcwd.c"
|
Reference in New Issue
Block a user