Hi, The musl implementation of nftw does presently not implement the FTW_CHDIR flag, which is mandated by POSIX. Unfortunately, musl does define this macro in the ftw.h header file which makes software using this flag compile but causes unexpected failures at run-time. Implementing this feature would likely require a larger overhaul of the current nftw implementation. Maybe it makes sense to remove the FTW_CHDIR macro from ftw.h as a short-term workaround in the meantime to prevent cumbersome run-time failures? Greetings, Sören
Sören Tempel <soeren@soeren-tempel.net> wrote:
> The musl implementation of nftw does presently not implement the
> FTW_CHDIR flag, which is mandated by POSIX. Unfortunately, musl does
> define this macro in the ftw.h header file which makes software using
> this flag compile but causes unexpected failures at run-time.
Ping. Any chance this could be fixed in the next release?
Greetings,
Sören
[-- Attachment #1: Type: text/plain, Size: 578 bytes --] Hi, On Fri, 3 Sep 2021, Sören Tempel wrote: > Sören Tempel <soeren@soeren-tempel.net> wrote: >> The musl implementation of nftw does presently not implement the >> FTW_CHDIR flag, which is mandated by POSIX. Unfortunately, musl does >> define this macro in the ftw.h header file which makes software using >> this flag compile but causes unexpected failures at run-time. > > Ping. Any chance this could be fixed in the next release? I can write a patch for it if we don't have one already. It would be nice to get this one fixed in the Alpine 3.15 release cycle. Ariadne
Ariadne Conill <ariadne@dereferenced.org> wrote: > Hi, Hello, > I can write a patch for it if we don't have one already. It would be nice > to get this one fixed in the Alpine 3.15 release cycle. No, we don't have one yet. Feel free to write one! :) Greetings, Sören
On Sat, Sep 04, 2021 at 05:04:21PM +0200, Sören Tempel wrote:
> Ariadne Conill <ariadne@dereferenced.org> wrote:
> > Hi,
>
> Hello,
>
> > I can write a patch for it if we don't have one already. It would be nice
> > to get this one fixed in the Alpine 3.15 release cycle.
>
> No, we don't have one yet. Feel free to write one! :)
If it's simple enough I don't mind reviewing it, but I'd really like
to rewrite this whole function to use an explicit stack. As it is now,
it blows away the stack badly on deep trees unless you ensure it's
only called from threads with rather large stacks. There's no good
reason for such a limitation, especially on a system with a PATH_MAX.
Having just written dir tree walking code for another project, I've
got this on my mind, and might try doing it sometime soon.
Rich