Created attachment 560710 [details, diff] x11-misc/xautolock: Unconditionally use waitpid() instead of wait3() Currently, the xautolock ebuild applies a patch to use waitpid() instead of the long obsolete wait3(), but only on glibc systems. This breaks the build on musl systems, since musl doesn't have wait3() either. Since all systems supported by Gentoo have waitpid(), we can just use it unconditionally. A patch is attached; it replaces the current debian/patches/14-do-not-use-union-wait-type.patch.
I am not sure I like "unconditionally". Couldn't you instead extend debian/patches/14-do-not-use-union-wait-type.patch to cover the musl case instead?
(In reply to Jeroen Roovers from comment #1) > I am not sure I like "unconditionally". Couldn't you instead extend > debian/patches/14-do-not-use-union-wait-type.patch to cover the musl case > instead? No. There's (intentionally) no way to detect musl at build time. If anything, the correct way to do this would be to tweak the build system so it checks whether waitpid() is available, but since all contemporary implementations have it (wait3() was already deprecated in SUSv2, back in '97), that's really not worth the hassle.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=075f311d7e8913f0a27f2247faac675ebb94d137 commit 075f311d7e8913f0a27f2247faac675ebb94d137 Author: Jeroen Roovers <jer@gentoo.org> AuthorDate: 2019-01-15 10:34:18 +0000 Commit: Jeroen Roovers <jer@gentoo.org> CommitDate: 2019-01-15 10:34:57 +0000 x11-misc/xautolock: Use waitpid() instead of wait3() Fixes: https://bugs.gentoo.org/675242 Package-Manager: Portage-2.3.55, Repoman-2.3.12 Signed-off-by: Jeroen Roovers <jer@gentoo.org> .../files/xautolock-2.2_p5_p1-waitpid.patch | 25 ++++++++++ x11-misc/xautolock/metadata.xml | 11 +++++ x11-misc/xautolock/xautolock-2.2_p5_p1-r1.ebuild | 54 ++++++++++++++++++++++ 3 files changed, 90 insertions(+)