From nobody Sat Feb 21 21:34:53 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 4fJL4G0H4cz6SJq9 for ; Sat, 21 Feb 2026 21:34:54 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fJL4F4wKwz3PSs for ; Sat, 21 Feb 2026 21:34:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771709693; 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=eqs1+AhAjd8Y3ky9kcUwvH7o2rZhCdNsu8eb057+swQ=; b=p7CVQ+Yjm8EDr6V2OOc3zwfhrDzqyDEZNq59Zl6nuaUAZ5tng3XQpDoX+coejm1oH/sty/ 4OCL0rNgBMTy01YSIQRmxkGkCao7Zcq/DjDJkoqGwCBjYbXC39KqsAZavS6d3tOZREHaHR 7q/eOXFLE/UiiW3sX8pqaEWe6Lequ6YTPLoFRN8bv3Cq3Y/CCv2eKd2DxSPwd9c5eP8Vuy i8LgevHHcLOON82tST1AWGssv9/zxDrp5WvpucG0avFDl8HsWiSUnrx8zf46IGaJmlLqij O9U3wueXlVW3BtsQIGBUygcDneEkmMLeum2AENGPtJ/LQI0IVZmg6ANG4NIhMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771709693; a=rsa-sha256; cv=none; b=Ap557n/ntJreSF1+f5vhC2i5xmuuAF4LGMvDvXRr9AuT0gsASbfDK5scMyYfqm7NYnUSjy Tw7CTN2aCGVgaaHaXxNGO/9ukSq/08HJLFaqCDtGM+//9xhg5fkzMtZJqtS0K3QgLc/0IB EPfFNLGqC2jfdW8gzwTz2sAC+uMWPOqKo6hmzV+VP9qRAZAuxJqpNFUiAtLk58xisi4ynb eR3mWd+rbvkDPOVbAO/IwVFip7Mhk3FEedB8tatfJeoxt0dPmWOYKGVqqiE7A6WHRBIZZ+ 9gbU97Kee8lSE4EC8BsfO+2ZZcWUHjVeeqSKVIs4gz2lZ4rOR8/ti5qBNTQ9EA== 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=1771709693; 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=eqs1+AhAjd8Y3ky9kcUwvH7o2rZhCdNsu8eb057+swQ=; b=jhCXda9iF6/znwtnjyI1MCx23Yb4FWkuNPX5mc0rgWAmp2GfUMSVYeXuq3BdlEcKzvkhn9 NP0wYzZ/NEP5H2pY8mBdrPDUBeLeEU+bl4N2xy/0XMZcT42OlbfkPoCH/Ujxo2K06aD5cA lyLzX9bR+aijh+H2N5l7KfUbVKl2jTC0W7dfSYaYlPke4y4TaoTGa3X7QaJu/Rxw1CWwB3 5/eZgaOFkpmt+BzPQFsX2+O/jdU98zVHMoJ1lZ1SrOaXWXCUZ9ckiqwt4wADyda9jvdrM8 Igb5d1940kBuutznOCLk09mly48zrvVYkZ0ReGbBwGyHHoMmqKUvXznRCFdEZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fJL4F4VgLzrP for ; Sat, 21 Feb 2026 21:34:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2318b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 21 Feb 2026 21:34:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 2d63a28811e6 - stable/15 - sys/event.h: reduce namespace pollution from sys/abi_compat.h 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2d63a28811e6ac98d1aee6398c97a14f93669f83 Auto-Submitted: auto-generated Date: Sat, 21 Feb 2026 21:34:53 +0000 Message-Id: <699a24fd.2318b.345befca@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2d63a28811e6ac98d1aee6398c97a14f93669f83 commit 2d63a28811e6ac98d1aee6398c97a14f93669f83 Author: Konstantin Belousov AuthorDate: 2026-02-09 20:13:21 +0000 Commit: Konstantin Belousov CommitDate: 2026-02-21 21:34:08 +0000 sys/event.h: reduce namespace pollution from sys/abi_compat.h (cherry picked from commit ecadac729a1b855fe0d77a682ee424c3da1eb3db) --- sys/dev/mfi/mfi.c | 5 +++-- sys/sys/abi_compat.h | 30 +----------------------------- sys/sys/abi_types.h | 39 +++++++++++++++++++++++++++++++++++++++ sys/sys/event.h | 2 +- 4 files changed, 44 insertions(+), 32 deletions(-) diff --git a/sys/dev/mfi/mfi.c b/sys/dev/mfi/mfi.c index 474afcff60a7..8ad343d6d813 100644 --- a/sys/dev/mfi/mfi.c +++ b/sys/dev/mfi/mfi.c @@ -52,11 +52,12 @@ * SUCH DAMAGE. */ -#include #include "opt_mfi.h" -#include #include +#ifdef COMPAT_FREEBSD32 +#include +#endif #include #include #include diff --git a/sys/sys/abi_compat.h b/sys/sys/abi_compat.h index f190dcda9b68..e696f0bae9db 100644 --- a/sys/sys/abi_compat.h +++ b/sys/sys/abi_compat.h @@ -4,11 +4,6 @@ * Copyright (c) 2001 Doug Rabson * All rights reserved. * - * Copyright 2026 The FreeBSD Foundation - * - * Portions of this software were developed by Konstantin Belousov - * under sponsorship from the FreeBSD Foundation. - * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -34,35 +29,12 @@ #ifndef _ABI_COMPAT_H_ #define _ABI_COMPAT_H_ -#include +#include /* * Helper types and macros for translating objects between different ABIs. */ -/* - * i386 is the only arch with a 32-bit time_t. - * Also it is the only arch with (u)int64_t having 4-bytes alignment. - */ -typedef struct { -#ifdef __amd64__ - __uint32_t val[2]; -#else - __uint64_t val; -#endif -} freebsd32_uint64_t; - -#if __SIZEOF_LONG__ == 8 -#if defined __amd64__ -typedef __int32_t time32_t; -#else -typedef __int64_t time32_t; -#endif -#else -typedef __int32_t time32_t; -#endif -#define __HAVE_TIME32_T - #define PTRIN(v) (void *)(uintptr_t)(v) #define PTROUT(v) (uintptr_t)(v) diff --git a/sys/sys/abi_types.h b/sys/sys/abi_types.h new file mode 100644 index 000000000000..e449c86323f7 --- /dev/null +++ b/sys/sys/abi_types.h @@ -0,0 +1,39 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2026 The FreeBSD Foundation + * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + */ + +#ifndef _ABI_TYPES_H_ +#define _ABI_TYPES_H_ + +#include + +/* + * i386 is the only arch with a 32-bit time_t. + * Also it is the only arch with (u)int64_t having 4-bytes alignment. + */ +typedef struct { +#ifdef __amd64__ + __uint32_t val[2]; +#else + __uint64_t val; +#endif +} freebsd32_uint64_t; + +#if __SIZEOF_LONG__ == 8 +#if defined __amd64__ +typedef __int32_t time32_t; +#else +typedef __int64_t time32_t; +#endif +#else +typedef __int32_t time32_t; +#endif +#define __HAVE_TIME32_T + +#endif diff --git a/sys/sys/event.h b/sys/sys/event.h index c313cafa9e99..de24c9226e4a 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -104,7 +104,7 @@ struct freebsd11_kevent { #endif #if defined(_WANT_KEVENT32) || defined(_KERNEL) -#include +#include struct kevent32 { __uint32_t ident; /* identifier for this event */