Reimplement scandirat to fix compilation with musl libc

Since my last batch of changes for building with musl libc, some new users of glibc-specific functions have been added to the tree. This PR enables compilation of libapparmor and apparmor_parser against musl libc. Some patches should be quite trivial, some of them are probably going to be controverse. I included all required patches anyway, hopefully to achieve full compatibility with musl libc, but at least to make upgrading less painful when parts of this have been upstreamed.


Most patches have been pulled already, so this PR is now only about the scandirat fix.

Edited by Patrick Steinhardt

Merge request reports

Loading