From 05dd09a3f901562cc20457b3e27cbf12189c6fce Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 2 Apr 2026 09:44:48 -0700 Subject: [PATCH] openssh: update to 10.3.P1 On the 32-bit MSYS2 runtime (3.3.x), the Cygwin C library exports arc4random_stir() as a symbol in its import library (libmsys-2.0.a), but the corresponding header (stdlib.h) does not declare it. Only arc4random(), arc4random_buf(), and arc4random_uniform() are declared. OpenSSH's configure script uses AC_CHECK_FUNCS to probe for arc4random_stir. That macro provides its own prototype ("char arc4random_stir();") for the link test, so the test succeeds on 32-bit. Configure then defines HAVE_ARC4RANDOM_STIR, which suppresses the no-op fallback macro in openbsd-compat/openbsd-compat.h and defines.h. When entropy.c is later compiled, the call to arc4random_stir() at line 120 has no visible declaration, and GCC 15's -Wimplicit-function-declaration (now an error by default) aborts the build. The 64-bit runtime (3.6.x) does not have this problem: its import library was cleaned up to match the headers, dropping arc4random_stir and arc4random_addrandom. So the configure link test fails on 64-bit, HAVE_ARC4RANDOM_STIR stays undefined, and the no-op macro ("#define arc4random_stir()") activates correctly. Work around this on i686 by passing ac_cv_func_arc4random_stir=no to configure, which forces the same no-op macro path that the 64-bit build takes naturally. The OpenSSH source itself documents arc4random_stir() as a "noop on recent arc4random() implementations", so skipping the actual call is the intended behavior. Assisted-by: Claude Opus 4.6 Signed-off-by: Johannes Schindelin --- openssh/PKGBUILD | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/openssh/PKGBUILD b/openssh/PKGBUILD index 3b4f11b88ab..a674a934ec0 100644 --- a/openssh/PKGBUILD +++ b/openssh/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Alexey Pavlov pkgname=openssh -pkgver=10.2p1 +pkgver=10.3p1 pkgrel=1 pkgdesc='Free version of the SSH connectivity tools' url='http://www.openssh.org/portable.html' @@ -16,7 +16,7 @@ source=("https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/${pkgname}-${pkgve 0003-openssh-skip-privilege-separation-tests.patch 0004-Allow-scp-to-copy-files-that-start-with-a-Windows-dr.patch 0005-Disallow-interop-tests-and-extra-tests-to-run-concur.patch) -sha256sums=('ccc42c0419937959263fa1dbd16dafc18c56b984c03562d2937ce56a60f798b2' +sha256sums=('56682a36bb92dcf4b4f016fd8ec8e74059b79a8de25c15d670d731e7d18e45f4' 'SKIP' 'ca1e4a8e6248cd4e36ece97005faff1cbd8bdfdda197be7194303a9e5209f492' '5d9a69b4e37dba1ecd87fa71a80743ba9563dd64b91698b1d667b6bcdac752ed' @@ -41,6 +41,14 @@ prepare() { build() { cd "${srcdir}/${pkgname}-${pkgver}" + # The 32-bit MSYS2 runtime (3.3.x) exports arc4random_stir() in its + # import library but does not declare it in , causing a build + # failure with -Wimplicit-function-declaration. Tell configure the + # function is absent so the existing no-op macro in defines.h kicks in. + if [[ "$CARCH" == "i686" ]]; then + export ac_cv_func_arc4random_stir=no + fi + TEST_SSH_UTF8=no \ ./configure \ --build=${CHOST} \