From nobody Sun Apr 12 05:57: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 4ftfvN0VMBz6YYyK for ; Sun, 12 Apr 2026 05:57: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftfvM3jfbz3mlY for ; Sun, 12 Apr 2026 05:57:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775973439; 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=eQ37Ge6jLS7510RDG1yV4tIgL2tlsUqrTBxSlSqt5vg=; b=k36Oz3SIPY3bcjCFJlz+s7HTl30UGhmziRs66fM6R4A5NqobtlC+yPWb7t9okaUo26q4eO FDE+ItAmKZmimmUxFlL5ACSpZ7P9gQqUifgU9AGe/b3dOTForuRFsTSwQpXyyT7yZhQWoe l02Ap50CiDeJtWok82MQs4njZ9vmSzuOJgXAokRtqu4hScQ3RH6rGk6j1FdRfVCulFydej orBMdBq94e/Bh5pE5xLq/qLzE2z9//vfvCmDiiuRN/Mw4XmiFql3E9Mg32/0scnbeK++u0 1/ZfCqsS3BKMemOVdJGhFMzdLHlDScSbaRB4S0yrxqNVnOYLdp14GiDbh59log== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775973439; a=rsa-sha256; cv=none; b=obfYYzLlmnCDEf1z/KotBm5sKNE+kO9DhbP4l9ZZEXNrNJAWC05D2VxpJgR2+jlaCaDF44 19YTKYIbc4VUIFA2p06UkgkXNVX0Z1g0lIQhy0bPt6eyeQUerOPvP59bMtjWfYNZC5jWps V7jNz8h3IRsKruVUrlZmRe3j+hSQ6ObSccEnFunRfbd5yFlCvclOVONm/RyQ4xanzywKxN lFbJP7pzNcQCZv6uKQeFm9BmP6h1KyTdH7e95p9fHJ95bmB7oBAKkFymM665fI61BvzulZ qtFZinEnsgHvKFAP1svM5GlKUBuEkInpNhCIa9Y7C+b8sUJUdHYP+4/fBaIg1A== 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=1775973439; 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=eQ37Ge6jLS7510RDG1yV4tIgL2tlsUqrTBxSlSqt5vg=; b=jJGGNlAdcIBPxyqEg0+7qrhs85fkksJvByyBgsF875TQ2IjGd6a5psHUxlcIxFQyBM03Wo +dWbB45/7Ry4PYtLLyVsTh1JQLJ3YyIZcdBD5u1C0OMNvQHrAzCoakhtZcoQzl/bZoOMym 3LqJJbKh6A8w5ZVSMNHntwErdoek00kSNqhOTpSymwc7U5742Jgi+cELp21f/CQWw2l3zG CUvVs+BWNjqNMVbV0TMPTCCeOm3wUT+QNsRMRUw0ZOxBYzB9cDRkJDyzQyNMZwkW5fnFxf I1IFpKRKDSArE3rvpvgI0zk+ZFmDuJAjUpXYYyXxquVvMumFoH+szIad+P2AdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftfvM2Xjrz144T for ; Sun, 12 Apr 2026 05:57:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31062 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 05:57:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Konstantin Belousov From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 5b2da2336091 - stable/14 - 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: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5b2da23360917537a086d30189edba22e4124c7e Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 05:57:19 +0000 Message-Id: <69db343f.31062.21cc0738@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5b2da23360917537a086d30189edba22e4124c7e commit 5b2da23360917537a086d30189edba22e4124c7e Author: Konstantin Belousov AuthorDate: 2026-02-09 20:13:21 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-12 05:56:47 +0000 sys/event.h: reduce namespace pollution from sys/abi_compat.h Split out types definitions into sys/abi_types.h, and only include abi_types.h into sys/event.h. Tested and reviewed by: bz Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55202 (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 af88085116c1..b4249f2082f5 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 8ade9690d548..a1cd224a960e 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -102,7 +102,7 @@ struct freebsd11_kevent { #endif #if defined(_WANT_KEVENT32) || defined(_KERNEL) -#include +#include struct kevent32 { __uint32_t ident; /* identifier for this event */