Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Mar 2025 07:51:14 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Jessica Clarke <jrtc27@freebsd.org>
Cc:        "src-committers@freebsd.org" <src-committers@freebsd.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@freebsd.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@freebsd.org>
Subject:   Re: git: a6ea60aa4887 - main - freebsd32/freebsd32.h: only define kinfo_knote32 when kevent32 is defined
Message-ID:  <Z-Dy0iJBNJemXCD9@kib.kiev.ua>
In-Reply-To: <24EE84A5-EED2-46A4-A6BF-137DE982833B@freebsd.org>
References:  <202503240407.52O47Sk3059876@gitrepo.freebsd.org> <24EE84A5-EED2-46A4-A6BF-137DE982833B@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 24, 2025 at 05:45:16AM +0000, Jessica Clarke wrote:
> On 24 Mar 2025, at 04:07, Konstantin Belousov <kib@FreeBSD.org> wrote:
> > 
> > The branch main has been updated by kib:
> > 
> > URL: https://cgit.FreeBSD.org/src/commit/?id=a6ea60aa48878d2d0c113f541fb2b9b8246ac06b
> > 
> > commit a6ea60aa48878d2d0c113f541fb2b9b8246ac06b
> > Author:     Konstantin Belousov <kib@FreeBSD.org>
> > AuthorDate: 2025-03-24 04:06:24 +0000
> > Commit:     Konstantin Belousov <kib@FreeBSD.org>
> > CommitDate: 2025-03-24 04:06:24 +0000
> > 
> >    freebsd32/freebsd32.h: only define kinfo_knote32 when kevent32 is defined
> > 
> >    Sponsored by:   The FreeBSD Foundation
> >    MFC after:      1 week
> > ---
> > sys/compat/freebsd32/freebsd32.h | 2 ++
> > 1 file changed, 2 insertions(+)
> > 
> > diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h
> > index c3234141d5a9..3a4625b8e2d3 100644
> > --- a/sys/compat/freebsd32/freebsd32.h
> > +++ b/sys/compat/freebsd32/freebsd32.h
> > @@ -446,6 +446,7 @@ struct kinfo_vm_layout32 {
> > uint32_t kvm_spare[12];
> > };
> > 
> > +#if defined(_WANT_KEVENT32) || (defined(_KERNEL) && defined(__LP64__))
> 
> Please don’t use __LP64__ to mean “not 32-bit”. Other ABIs exist downstream.
> 
> Is there a reason the RHS of the || isn’t just defined(COMPAT_FREEBSD32)?

This line is the verbatim copy of the braces around the struct kevent32
in sys/sys/event.h. I suspect that both kevent32 and kinfo_knote32
definitions can be predicated on just _KERNEL, to be unused for 32bit
kernel builds without consequences.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Z-Dy0iJBNJemXCD9>