Date: Wed, 12 Jun 2019 15:42:55 -0700 From: Gleb Smirnoff <glebius@freebsd.org> To: =?utf-8?Q?T=C4=B3l?= Coosemans <tijl@freebsd.org> Cc: Dmitry Chagin <dchagin@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348847 - head/sys/sys Message-ID: <20190612224255.GA67242@FreeBSD.org> In-Reply-To: <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> References: <201906100528.x5A5S4gm072561@repo.freebsd.org> <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 10, 2019 at 11:09:09AM +0200, Tijl Coosemans wrote: T> > Date: Mon Jun 10 05:28:03 2019 T> > New Revision: 348847 T> > URL: https://svnweb.freebsd.org/changeset/base/348847 T> > T> > Log: T> > Use C11 anonymous unions. T> > T> > PR: 215202 T> > Reported by: glebius T> > MFC after: 2 weeks T> > T> > Modified: T> > head/sys/sys/ucred.h T> > T> > Modified: head/sys/sys/ucred.h T> > ============================================================================== T> > --- head/sys/sys/ucred.h Mon Jun 10 05:09:34 2019 (r348846) T> > +++ head/sys/sys/ucred.h Mon Jun 10 05:28:03 2019 (r348847) T> > @@ -89,12 +89,11 @@ struct xucred { T> > gid_t cr_groups[XU_NGROUPS]; /* groups */ T> > union { T> > void *_cr_unused1; /* compatibility with old ucred */ T> > - pid_t _pid; T> > - } _cr; T> > + pid_t cr_pid; T> > + }; T> > }; T> > #define XUCRED_VERSION 0 T> > T> > -#define cr_pid _cr._pid T> > /* This can be used for both ucred and xucred structures. */ T> > #define cr_gid cr_groups[0] T> T> Isn't this a userland header that should work with non-C11 compilers? It could make sense to keep such low bar for standard headers, but ucred.h is BSD-specific header and struct xucred is FreeBSD specific. -- Gleb Smirnoff
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190612224255.GA67242>