While I hit this on x86 musl, its clearly a mistake independent of arch and libc. The following upstream commit https://github.com/rapier1/openssh-portable/commit/e3ea335abeab731c68f2b2141bee85a4b0bf680f changed the SC_ALLOW(), SC_ALLOW_ARG() and SC_DENY() macros so they don't prepend __NR_ to the syscall number. This change was consistently pushed through for all syscalls except socketcall. Lines 1662-1664 of openssh-7.7p1-hpnssh14v15-gentoo1.patch adds the following: +#ifdef __NR_socketcall + SC_ALLOW(socketcall), +#endif But this should read +#ifdef __NR_socketcall + SC_ALLOW(__NR_socketcall), +#endif Building with USE=hpn bails with socketcall not defined. I don't know what happens on other arches/libcs, but even if it works, this should be fixed as the logic is incorrect.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1a1048cb7a8810473fbead4eca8cd963be976d1 commit e1a1048cb7a8810473fbead4eca8cd963be976d1 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2018-06-18 23:30:43 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2018-06-18 23:33:38 +0000 net-misc/openssh: bump to address multiple issues - Fix building on x86 due to undefined socketcall when "hpn" USE flag was set. [Bug 658232] - Fix segfault when using sshd with "sctp" USE flag. [Bug 658308] Closes: https://bugs.gentoo.org/658232 Closes: https://bugs.gentoo.org/658308 Package-Manager: Portage-2.3.40, Repoman-2.3.9 RepoMan-Options: --force net-misc/openssh/Manifest | 4 ++-- .../{openssh-7.7_p1-r100.ebuild => openssh-7.7_p1-r101.ebuild} | 4 ++-- .../openssh/{openssh-7.7_p1-r4.ebuild => openssh-7.7_p1-r5.ebuild} | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)