From nobody Tue Jun 2 16:42:08 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gVGns004Mz6ftR2 for ; Tue, 02 Jun 2026 16:42:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gVGnr61k4z3n7c for ; Tue, 02 Jun 2026 16:42:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780418528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KLt8S083VoafzO4nYfDWf80i2DvyJi2Gxw5mQFZNEuw=; b=GtSg5ycxbDC3UASJb77N9+9mI5n+gkbNsMfYY7u/n9kraVUadNJuJ6YNG96kvoEqqojEwk 1h4ht++Y2tkdo1BBJjMhTNmWGLGftusrN4DIV1uN88845xb5kzpl0tOpDPI2nY1hsdnMH8 tsrSyrG5t9iiUEmdXURVb+xJCjumfX1SwrDf4Xx31RQnqh6tnqDUsD9DrYDVfwNzCP1fkY a8o1PbtDJwXo0Hos6Xp6RyMr7kPjG8F6hmyZgwypmXC7BTOwDpS0tiUIGD0omrV/lBygBR ytveXrrivHi0kHVZyuwhmsPlB7fyToZdyNIWvpNIfHk37h829wQo5jgagt56GQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780418528; a=rsa-sha256; cv=none; b=n5nm3nq5WJd2h8QuynqyvX52HBZ4FOjV1trsu794g3Zmb2wIm5AkuPx2T9y/T5XSN1ThZ0 //Z+FFl44NyRtQIHXKManENu1fJeVqiDZH0ynQh0H1Cf+9xyokm/G7OuT2tZk1b3cttbjx dc+sZ4wqGje1P9M27hRk5LomI/XzORFYnaBluiT98fGDaHawjJARjm3rbnZ9SK5wVwwsb0 i2bCE+Fxw51JVbzz+YtFX8crqHpY7Rb5yM3x/0/FDKbjSqUA0qtNsPtJqlCGrwP4xR0PpI 4XJKOf0ll5DFWMJV+rHWBwHGCplki6675T4nMk4/ZMs3r2WG6umQURZi4lFNJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780418528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KLt8S083VoafzO4nYfDWf80i2DvyJi2Gxw5mQFZNEuw=; b=Fyh77nw4GCcCLrhWkUvYY+scTLNkitwnjExTPdHTq2L9yWQViy5mIrnMlr2vNmr5+iKg92 xFXItNhOdy8+EEsiwJ55yfl8zxNr8qj8N/Ql+DcglxgoXZp8dq5T/jFtvn7F28aPOXY5nt 00AgMhGSsFP1HwHeHREfCRkfIMxyXyQ+d+B4oZOBGnvtvfwx2sRMHwaO0YScvZKk7+r9Vv XZbuFDfEp2cQXGiXqTsYcFrCTxc5n4WFp64Hd1+Y+aTQdsi7rJwqHLfr1wODoXrasR+cj3 YO0TDNJ88uXn+fQkXHOFyds0glzFxG8W741GL2vFP6dn94a+G5c7oGl3sOW43g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gVGnr5YskzZLC for ; Tue, 02 Jun 2026 16:42:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 467e9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 02 Jun 2026 16:42:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mark Johnston From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: e6470ed3d59b - stable/15 - libarchive: Force GNU iconv compatibility on FreeBSD List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e6470ed3d59b5c36262a9cdb76b71a7ad25d173b Auto-Submitted: auto-generated Date: Tue, 02 Jun 2026 16:42:08 +0000 Message-Id: <6a1f07e0.467e9.7b58d284@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=e6470ed3d59b5c36262a9cdb76b71a7ad25d173b commit e6470ed3d59b5c36262a9cdb76b71a7ad25d173b Author: Mark Johnston AuthorDate: 2026-05-20 16:39:40 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-06-02 16:41:37 +0000 libarchive: Force GNU iconv compatibility on FreeBSD When libarchive is compiled with FreeBSD's native iconv instead of libiconv, as happens with libarchive in the base system, we need to configure iconv(3) to handle invalid sequences by returning -1, as iconv_strncat_in_locale() assumes GNU iconv semantics. This corresponds to upstream PR 3056. PR: 294577 MFC after: 1 week (cherry picked from commit bd15d6ef126ee4c0eac931117f6bbbf6f9a3fc72) --- contrib/libarchive/libarchive/archive_string.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/contrib/libarchive/libarchive/archive_string.c b/contrib/libarchive/libarchive/archive_string.c index c6ae8968d54f..4fb96a9fa178 100644 --- a/contrib/libarchive/libarchive/archive_string.c +++ b/contrib/libarchive/libarchive/archive_string.c @@ -1314,7 +1314,17 @@ create_sconv_object(const char *fc, const char *tc, else if (strcmp(fc, "CP932") == 0) sc->cd = iconv_open(tc, "SJIS"); } -#if defined(_WIN32) && !defined(__CYGWIN__) +#if defined(__FreeBSD__) && !defined(HAVE_LIBICONV) + /* + * FreeBSD's native iconv() by default returns the number of + * invalid characters in the input string, as specified by + * POSIX, but iconv_strncat_in_locale() assumes GNU iconv + * semantics. + */ + int v = 1; + + (void)iconvctl(sc->cd, ICONV_SET_ILSEQ_INVALID, &v); +#elif defined(_WIN32) && !defined(__CYGWIN__) /* * archive_mstring on Windows directly convert multi-bytes * into archive_wstring in order not to depend on locale