Error: undeclared identifier 'innetgr' with Clang+musl under Gentoo
Hello there! It is unable to compile sys-auth/polkit-0.120-r1::gentoo With next PC configuration: musl-1.2.2-r7, 5.15.11-gentoo x86_64 clang version 12.0.1 Target: x86_64-gentoo-linux-musl Thread model: posix LLVM: 12.0.1 with libcxx
Getting next error:
../polkit-0.120/src/polkitbackend/polkitbackendjsauthority.cpp:1530:7: error: use of undeclared identifier 'innetgr'
In case of /* comment */ this fragment of code, there unable to get it ready with another error:
`ld.lld: error: undefined symbol: js_polkit_user_is_in_netgroup(JSContext*, unsigned int, JS::Value*)
referenced by polkitbackendjsauthority.cpp polkitbackendjsauthority.cpp.o:(js_polkit_functions) in archive src/polkitbackend/libpolkit-backend-1.a
ld.lld: error: undefined symbol: setnetgrent
referenced by polkitbackendinteractiveauthority.c polkitbackendinteractiveauthority.c.o:(polkit_backend_interactive_authority_check_authorization) in archive src/polkitbackend/libpolkit-backend-1.a
ld.lld: error: undefined symbol: getnetgrent
referenced by polkitbackendinteractiveauthority.c polkitbackendinteractiveauthority.c.o:(polkit_backend_interactive_authority_check_authorization) in archive src/polkitbackend/libpolkit-backend-1.a
ld.lld: error: undefined symbol: endnetgrent
referenced by polkitbackendinteractiveauthority.c polkitbackendinteractiveauthority.c.o:(polkit_backend_interactive_authority_check_authorization) in archive src/polkitbackend/libpolkit-backend-1.a clang-12: error: linker command failed with exit code 1 (use -v to see invocation) `
Please, fix it, or provide some patch for clang, with GCC btw there any problems. I need GCC-GLIBC-less system for educational needs. Without Polkit I am unable go ahead with setup for any desktop environment like Gnome, Cinnamon etc (strong dependencies between packages occur). Thanks!