this patch allow net-libs/libtirpc-0.2.4-r1 to compile and run under gentoo over musl Reproducible: Always
Created attachment 389534 [details, diff] patch
What fails?
Compilation fails in part because of missing <sys/cdefs.h> and missing <sys/queue.h>. This patch is very likely intended for the musl branch on the hardened-development overlay, which collects patches to make things work with musl. For upstreaming the patch should likely be split up. One for fixing the <sys/cdefs.h> portability issue. For <sys/queue.h>, one could try to ask the project to include a copy for systems missing the header. I'm not sure about what the other parts of the patch do.
(In reply to Jeroen Roovers from comment #2) > What fails? compilation fails, thanks for catching this, didn't noticed I was missing something
(In reply to Felix Janda from comment #3) > Compilation fails in part because of missing <sys/cdefs.h> and missing > <sys/queue.h>. This patch is very likely intended for the musl branch on the > hardened-development overlay, which collects patches to make things work > with musl. > > For upstreaming the patch should likely be split up. One for fixing the > <sys/cdefs.h> portability issue. For <sys/queue.h>, one could try to ask the > project to include a copy for systems missing the header. I'm not sure about > what the other parts of the patch do. the patch does 4 things: 1. remove headers (queue.h and cdefs.h) 2. add definitions which are needed (TAILQ and others are being used in the code and there is no implementation for it in musl or THROW) 3. add code parts (for code that is gnu and needed for the program) or includes that have data which is used by the program. 4. the defines __BEGIN_DECLS and __END_DECLS doesn't exists in musl libc, so according to the musl faq at http://wiki.musl-libc.org/wiki/FAQ#Q:_I.27m_trying_to_compile_something_against_musl_and_I_get_error_messages_about_sys.2Fcdefs.h it should be replaced.
removing the __BEGIN_DECLS is not an improvement at any rate, you should send these fixes to the libtripc people: libtirpc-devel@lists.sourceforge.net