there is a special place in Hell for the glibc developer who decided to discard the d_namlen value provided by the kernel, preventing normal user apps from using it
This commit is contained in:
parent
fa8edbf819
commit
f6f55f4337
1 changed files with 1 additions and 2 deletions
|
|
@ -6253,10 +6253,9 @@ static void tp_ftw(char *restrict const dir, unsigned dirlen, int rsrc,
|
|||
#warning Failed to see DT_UNKNOWN
|
||||
#endif
|
||||
|
||||
#ifdef _DIRENT_HAVE_D_NAMLEN
|
||||
#if defined(_DIRENT_HAVE_D_NAMLEN) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
int d_namlen = f->d_namlen;
|
||||
#else
|
||||
#warning Failed to see _DIRENT_HAVE_D_NAMLEN
|
||||
int d_namlen = strlen(f->d_name);
|
||||
#endif
|
||||
int add_rsrc = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue