From nobody Tue Jun 2 16:42:19 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 4gVGp406pKz6ftH3 for ; Tue, 02 Jun 2026 16:42:20 +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 4gVGp32rf1z3nHm for ; Tue, 02 Jun 2026 16:42:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780418539; 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=qSQKYa0nrDWdJHyLs6Ruih62Eosy7JsfEENPDNqA9gY=; b=VaCtWoZVgzSUJkfVE7xKN9Z/cMLRTknJGAafWYG06DH9Q8i/XK+KWjxAvF7V1Xtc9jqi9m ttWwHC02fKH8ChcjB4T14RpGxnBYoeSgOYF1a6pyW8jRbDY09V9QWfmK6ATlb5ZYrVdbH4 cquEzGeUhAeHOXNLv0HeZvmfo5EtA7lOw18qv675D/WnVPM64wqxUNgnpMltt8t9IxNqWT uhbC2rzUZO4I6qanzh7D/xKbJLoepdevL7nXylz+rCv/KKOvU5jT/zZIY/Oo9hxQrlx1NL 9AwSWk1njUFe132eh32fh8eEpkINaGQIGxWabc98i4Fl0pn5WwHfqItrsycHGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780418539; a=rsa-sha256; cv=none; b=jp9V3a+AtQzZDWrqgYJQuzf3L/oUe0XW3O8Uq6Ue5tA4dV0JrJo7ULjtSPTOQoBbBV+Q3k AQm7iqMbmk2H3tHi/ZAYnpAOqvryQ8EiEUA03heXINRiHMJR+mePT2TLOdHaHTHfX1BUJ6 z3xuIcOtbNoJhjsaigha+CJslbxp/6fF8NacskikdwPgpu1X9unCZJqnYv+p7sf7FPlgdA HBOWdOt0uJ4uJyP9yTfYe8JHtSdcdNyYchD46p2KSfbJmhUjLBw8j2l2eVe7x3nK8BStM9 NfX4DnHtpQLrPLgmae1bRtVdrFbqnmk+o/VhhpB6+rGQVPJNyyHGyxAISarlWA== 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=1780418539; 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=qSQKYa0nrDWdJHyLs6Ruih62Eosy7JsfEENPDNqA9gY=; b=LwDahO+/gNEaWXGA2Ves5Bb+Wr7ceE9gGGyKx19EeleZNK4BJayyAg8adOmFwbup+FyrEO bTi68OFzTAKIMWtcWz+dEFJLOj7as8E/jDMpwUBnGXNZWeL5Nejq6jxgxq0AsI0queTzRl 89u9rhf4iT8Y0XwcVJvfbXtCOI0k2APuXmAsJ7nbhv1YECBJOguV0pAhE+z6jfl5Kbbyej D4BS2oCixh6o+/yNPbHFPnmL5Mxv0yrlANbpAkW8Wa3WNPXg74Ix0E7tLRlFqkhuF/uYwo aRLHPIAzyysBfsXHEsF4d0fPpkykIDT5mOWiVfEa0/8g5Sk8WeuqCKiH9JjJZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gVGp329dMzZVG for ; Tue, 02 Jun 2026 16:42:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 451c3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 02 Jun 2026 16:42:19 +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: 5fd06985f8f0 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 5fd06985f8f0b8591866498dc59cdfa3d82c6e78 Auto-Submitted: auto-generated Date: Tue, 02 Jun 2026 16:42:19 +0000 Message-Id: <6a1f07eb.451c3.5ac5b656@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5fd06985f8f0b8591866498dc59cdfa3d82c6e78 commit 5fd06985f8f0b8591866498dc59cdfa3d82c6e78 Author: Mark Johnston AuthorDate: 2026-05-20 16:39:40 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-06-02 16:42:02 +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