From nobody Sun May 26 17:40:25 2024 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 4VnQzG1dyYz5LQBr; Sun, 26 May 2024 17:40:26 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VnQzF6Rw0z53sb; Sun, 26 May 2024 17:40:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745225; 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=+MKWmMp6qLapy3NpWECdhq/czwUsH2gTIp/U0nCF8KQ=; b=Mcwz80yuGOi/dfxVuqgXaxUPftDR/73MYWNnjTnTUy2XXYQwmJM2lHTL/VvvZsrAkc+raH nehmWhKnm9d9lk9jgxRTnlYxRTMaD/umbVeHgpbfGr0QUBbhDP9FbYHfeXLZyMwA4NRc12 5rYHtV9j8d/ArXMHTz2CgJIFRnRAt+5g8G04H/QLqvo7tz/YYnLteRnye2P9ajmvmiQ7aO I33CzifK+/D+oHntEZP0D/qfV3UKiP/aQK82jH7N6sNtEthOkkgKXajhDhfAWmuUa7YSE/ oKAU0DJxD2tDjVZEe9+rTI9EcrDOCpb3Xyw+9vIqemOw2tHUpmYl1bicLE82dA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716745225; a=rsa-sha256; cv=none; b=VLb5XT15N5uYBDM0LOYSj5cBg4gtxDos0uusEN1wWqkBJ64jVPY7N6fhmbcSY/0f/yh1jw RIc2oXBBRF7s8nUdCqp6wsn7Gw7IR48OeoWiiAwmaNkH0DlDZ+Ti0wNd9K3uGrAi3HUark 8SzhBlDhQECN43orJfP1e1LJlE/DklJJ0ak/IJ/Y8NfJJOCLhOvH6qNDFjpCwdNyUVNT0L pnNLi5as7Pz/KTo1WTJQej9kdfKRnDTcF3iWaE7Kp2mDsVAQmjgBCuQyTuIqMbsfXJdxGJ EI6i/nZAm4ZzseMDx5ZZGPxp/V+vZRwQF5IXLhcDc4c/EN2QDO/X2XyDkyOsMQ== 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=1716745225; 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=+MKWmMp6qLapy3NpWECdhq/czwUsH2gTIp/U0nCF8KQ=; b=JfRAjaobUyVfHQqV4lP4xPL8owXXVttYDt14MsG7iZtyPijjgNUko6Qf/622JsZuRbU27x h3lHKtm4XAVDYgojuvaDerYx7ofj5uU/lwj2rzwHUnGpPnCJVOR9uQzo4NyrOLOvv0fVpX 3Cp3+022+sTz/36CiQwWe2mmluKuzBZ/bc8vofq15qy2jzOvZ4iqEpwdUaMebAIe5Ph7MO rptkKH+bqozceZ+VdbxM+ADv6VDhNb6DZ1Z8owktp3J0tH+G2j5ut2m/2gJuIhr3PNyJjw V05TxL3MszuvNQ9mabdPKrZDv2Z3W1LVjjxopOqA1kUWZ7F/MWwVQiZo8tzJkQ== 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 4VnQzF5shJz18g0; Sun, 26 May 2024 17:40:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44QHePSZ085558; Sun, 26 May 2024 17:40:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44QHePCC085555; Sun, 26 May 2024 17:40:25 GMT (envelope-from git) Date: Sun, 26 May 2024 17:40:25 GMT Message-Id: <202405261740.44QHePCC085555@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 3c5f0da5106b - main - cross-build: Define __*int*_t and include sys/cdefs.h 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3c5f0da5106bee21ab3726f608b5c377da92a733 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3c5f0da5106bee21ab3726f608b5c377da92a733 commit 3c5f0da5106bee21ab3726f608b5c377da92a733 Author: Warner Losh AuthorDate: 2024-05-26 17:39:18 +0000 Commit: Warner Losh CommitDate: 2024-05-26 17:39:18 +0000 cross-build: Define __*int*_t and include sys/cdefs.h FreeBSD assumes that sys/types.h includes sys/cdefs.h, so add it here. FreeBSD also needs __*int*_t defined for software we bootstrap (a lot of it). GLIBC defines these, but musl does not, so we have to define them here, even though it looks backwards. There's no good #define to key off of, so use !defined GLIBC since on Linux defacto there's only two libc implementations. Co-authored-by: Val Packett Sponsored by: Netflix Pull Request: https://github.com/freebsd/freebsd-src/pull/1066 Reviewed by: val_packett.cool Differential Revision: https://reviews.freebsd.org/D45354 --- tools/build/cross-build/include/linux/sys/types.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tools/build/cross-build/include/linux/sys/types.h b/tools/build/cross-build/include/linux/sys/types.h index 222560167a71..2e09cbb62271 100644 --- a/tools/build/cross-build/include/linux/sys/types.h +++ b/tools/build/cross-build/include/linux/sys/types.h @@ -35,6 +35,27 @@ */ #pragma once +#include /* FreeBSD source assumes sys/types.h includes this */ +/* + * MUSL doesn't define the __intXX_t that FreeBSD does, but many of our headers + * assume that will always be present. Define them here. We assume !defined + * __GLIBC__ is musl since musl doesn't have a define to key off of. Thesee + * typedefs look backwards, but it's not circular because MUSL never defines the + * __*int*_t. Also, we don't have to work in the kernel, so it's OK to include + * stdint.h here. + */ +#ifndef __GLIBC__ +#include +typedef int64_t __int64_t; +typedef int32_t __int32_t; +typedef int16_t __int16_t; +typedef int8_t __int8_t; +typedef uint64_t __uint64_t; +typedef uint32_t __uint32_t; +typedef uint16_t __uint16_t; +typedef uint8_t __uint8_t; +#endif + #include_next /*