Created attachment 441504 [details] Put #ifdef around include of sys/queue.h RPCbind needs some patches to compile on musl libc, because RPCbind uses sys/queue.h, which isn't POSIX and uses GNU specific extensions.
Created attachment 441506 [details] Remove the usage of the __P() GNU extension This patch shouldn't be applied unconditionally, which is okay to do with the other patch, so this patch should preferably be guarded by if use elibc_musl; then epatch $PATH; fi in src_prepare function.
Thanks for the patches! Regarding attachment 441504 [details], the <sys/queue.h> include can be removed unconditionally. It is not used. Why does attachment 441506 [details] need to be applied conditionally on elibc_musl? The __P macro (also present for example on BSDs) is for compatibility for long obsolete K&R C-compilers. For ANSI C compilers __P(x) is the same as x. Before suggesting the patch upstream I would remove the now extraneous space between the function name and the opening bracket.
Ah okay, then I'll make a new patch that just removes it. To be honest, I didn't really look at what the __P() macro was supposed to do, but when I googled around __P() and musl, it was clear that it was a non-compatible macro with musl, so then we maybe should just apply it unconditionally and be done with it. Sorry for late reply, completely missed that you had commented.
Created attachment 444122 [details, diff] Remove the include of sys/queue.h as its not used
Created attachment 444124 [details, diff] Remove the usage of the __P() GNU extension, removes extranous space
(In reply to Daniel Kuehn from comment #5) > Created attachment 444124 [details, diff] [details, diff] > Remove the usage of the __P() GNU extension, removes extranous space __P() is in sys/cdefs.h and it used to be used to set up protoypes for brain dead compilers. Its definition has been reduced to /* These two macros are not used in glibc anymore. They are kept here only because some other projects expect the macros to be defined. */ #define __P(args) args #define __PMT(args) args You're patch is overkill. Just find with sys/cdefs.h is pulled in and add the following: #undef __P #define __P(args) args That should then build on all libcs. Please test on both musl and glibc and if it works, apply the patch unconditionally to the ebuild. I'll add it to the tree.
I agree that we probably want to use the smaller patch. The larger patch is however the correct one to be submitted upstream. Actually, the __P() issue was already fixed upstream: http://git.linux-nfs.org/?p=steved/rpcbind.git;a=commit;h=196e8f3abaa6e8899ba2655c6c2d8751e33a9795 Could someone send the other patch to linux-nfs@vger.kernel.org?
(In reply to Felix Janda from comment #7) > I agree that we probably want to use the smaller patch. > > The larger patch is however the correct one to be submitted upstream. > Actually, the __P() issue was already fixed upstream: > > http://git.linux-nfs.org/?p=steved/rpcbind.git;a=commit; > h=196e8f3abaa6e8899ba2655c6c2d8751e33a9795 > > Could someone send the other patch to linux-nfs@vger.kernel.org? Can't we just backport that patch? Or is there a newer release I can add to the tree?
Created attachment 448918 [details, diff] upstream patch The patch is taken straight from upstream git, and it at least applies to version 0.2.3. It is not part of the current version 0.2.4-rc1.
(In reply to Felix Janda from comment #9) > Created attachment 448918 [details, diff] [details, diff] > upstream patch > > The patch is taken straight from upstream git, and it at least applies > to version 0.2.3. It is not part of the current version 0.2.4-rc1. okay i added 0.2.3-r2 with this patch and tested. its ~arch so we may want to stabilize it soon.