From nobody Mon Apr 28 17:10:59 2025 X-Original-To: dev-commits-src-main@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 4ZmVMm0pjSz5tblC; Mon, 28 Apr 2025 17:11:00 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZmVMl3sbrz3rsl; Mon, 28 Apr 2025 17:10:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745860259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bZaMEOtKk5gZpezhkyNBcj9Dj+8DYV/KweVMkMUaGes=; b=aC37qbUYQ8YMYTR2yU1XZgtf2YrUQmu7yoaxKSqHnw8+lRG3xTkLkkpaMMD/x9P1FSsYhW UmQA0LeCIyb7+2VT5DnZSDSSKMH4YZgV6hja+qulMbFw3wxEFVv32baVbPwodOqRGNoCu9 3z/UB0CRrp3a7Rg/FKN0as+a2XTgwTX1uKCgm7G7NQ3+Qt5pPa+94V1CNgI8la+cfB6Ipm 0ua6sbQt0331Rgt75dgDx0t9/O0u2Hth6uGhpjDYy1N9ukDcjj6w02GfpKPVujWW8IlE9f y2cw8jJGFAPath3NmBMcGaMr6BvLahITKagV+jtWBV6tUikFuAFUcYnQlRJ5Uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1745860259; a=rsa-sha256; cv=none; b=C1QWIT7HyeO/yQ6IjgiYLD7vFDN8oxx56LBYbliidb/zGFl5J7Z5W6k2IvKBda2TzoJEvT 2BGbC3i7QYMKPi/DOwo5qcpDxLsi0Cun3fQgTV+sJvGHHx8DJ7A/W2HuM8V81k8Voi1YZ0 KYm8oa9xf2uHjogHODvGgT3LvS9ylbQfZeicVKRFJ1disqASccDGJxZ+uR/03//QOjBWdQ RTX6nmJc6D9hOfr0nGEilNN4i7UDc9nZKXCf3TOeFHJ4BIp3YnUJLXtGjLSsqkf4nRuxaF TNoc89TdTuFSnOb0811udeWABpvvT2u6bfBlXaK3FaqtsRfcaiCFRdhliqvDbg== 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=1745860259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bZaMEOtKk5gZpezhkyNBcj9Dj+8DYV/KweVMkMUaGes=; b=qvYLzBxsvXKHr4nvsrA5XbfFXBpyGN62hGbX6aYmDFpbp87sxCV60cjMHJS9xqF4fH/Fu8 9XM0yOQyevq23uoivVjwL3+6xnKPN+odDB5zyT57B+awd6dCSsUugJlv9VxkAz0Ozo5HyF t2vPrIITPv4HZvaJxQCiQB3GR6QvGd19PUUFFBHCvolMzJOD1T5GIlWQST3C6gWBCqLhiq Py/J+mOKGTQwsH7hrq6gCvNw3F3b/GYLGVkTIS388TLwvkmZq2tDaxZEoW0BJJbDWaQPPW Ghjjf18GjmTXRWTnXxMOiv3TU/vaNEzjZ2EyoKm3CEBC+lIZ8xGjJEHs2JCM1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZmVMl39vVzl1T; Mon, 28 Apr 2025 17:10:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 53SHAxqt066153; Mon, 28 Apr 2025 17:10:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53SHAxGp066150; Mon, 28 Apr 2025 17:10:59 GMT (envelope-from git) Date: Mon, 28 Apr 2025 17:10:59 GMT Message-Id: <202504281710.53SHAxGp066150@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 4e2616b74cb7 - main - cross-build: Workaround system-provided strchrnul on macOS 15.4+ List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e2616b74cb7eed921aa10fb776cdc2d5fd4e42f Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4e2616b74cb7eed921aa10fb776cdc2d5fd4e42f commit 4e2616b74cb7eed921aa10fb776cdc2d5fd4e42f Author: John Baldwin AuthorDate: 2025-04-28 17:10:41 +0000 Commit: John Baldwin CommitDate: 2025-04-28 17:10:41 +0000 cross-build: Workaround system-provided strchrnul on macOS 15.4+ macOS added a native strchrnul in 15.4. There is not an easy way to detect it at compile time, so use a macro to rename our local inline version to avoid conflicts while also forcing its use during bootstrap. The local version can be removed once macOS versions older than 15.4 are no longer supported as build hosts. Co-authored by: jrtc27 Reported by: kib Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D49893 --- tools/build/cross-build/include/mac/string.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/build/cross-build/include/mac/string.h b/tools/build/cross-build/include/mac/string.h index d7db0d3023a4..58464f1f9834 100644 --- a/tools/build/cross-build/include/mac/string.h +++ b/tools/build/cross-build/include/mac/string.h @@ -38,9 +38,12 @@ #include_next /* - * strchrnul is not provided by macOS and the strchrnul.c implementation - * can not be compiled on macOS so just provide it inline here + * strchrnul is provided by macOS 15.4 and later. However, there is + * no good way to detect the current host version at compile time, so + * provide an inline definition under an alternate name. */ +#define strchrnul(p, ch) __freebsd_strchrnul(p, ch) + static inline char * strchrnul(const char *p, int ch) {