From owner-svn-src-head@freebsd.org Wed Jun 12 22:49:11 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B0DD15C3E71; Wed, 12 Jun 2019 22:49:11 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 36D7190447; Wed, 12 Jun 2019 22:49:09 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id x5CMgt5O009440 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 12 Jun 2019 15:42:55 -0700 (PDT) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id x5CMgtrB009439; Wed, 12 Jun 2019 15:42:55 -0700 (PDT) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Wed, 12 Jun 2019 15:42:55 -0700 From: Gleb Smirnoff To: =?utf-8?Q?T=C4=B3l?= Coosemans Cc: Dmitry Chagin , 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> References: <201906100528.x5A5S4gm072561@repo.freebsd.org> <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 36D7190447 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.92 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_SHORT(-0.92)[-0.924,0]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 22:49:11 -0000 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