From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14201 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH 1/2] define daddr_t type Date: Fri, 7 Jun 2019 02:18:53 -0400 Message-ID: <20190607061853.GT1506@brightrain.aerifal.cx> References: <20190607051444.20316-1-petr.vorel@gmail.com> <20190607052850.GO1506@brightrain.aerifal.cx> <20190607055329.GB7177@x230> <20190607055849.GR1506@brightrain.aerifal.cx> <20190607060619.GD7177@x230> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="637"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-14217-gllmg-musl=m.gmane.org@lists.openwall.com Fri Jun 07 08:19:10 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1hZ8DW-0018IR-7f for gllmg-musl@m.gmane.org; Fri, 07 Jun 2019 08:19:10 +0200 Original-Received: (qmail 26076 invoked by uid 550); 7 Jun 2019 06:19:06 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 26056 invoked from network); 7 Jun 2019 06:19:05 -0000 Content-Disposition: inline In-Reply-To: <20190607060619.GD7177@x230> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:14201 Archived-At: On Fri, Jun 07, 2019 at 08:06:20AM +0200, Petr Vorel wrote: > Hi Rich, > > > > .... > > > > > +++ b/include/sys/types.h > > > > > @@ -29,6 +29,7 @@ extern "C" { > > > > > #define __NEED_clock_t > > > > > #define __NEED_suseconds_t > > > > > #define __NEED_blksize_t > > > > > +#define __NEED_daddr_t > > > .... > > > > > daddr_t is not a standard type, so can't be exposed by default here > > > > (aside from the dubious "*_t is always reserved" rule), and it's only > > > So should it be wrapped by #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ? > > > > > proposed to be used in one header, so it doesn't belong in alltypes.h > > > > either. > > > Where should it be then? Shell I create bits/types.h for it? > > > The goal is to be loadable from > > > Why? It's not a reasonable type for any application to use -- we've > > never gotten a report that something failed to build because of its > > absence, and even if we did, it would almost surely be a case of "fix > > the application". It looks like the only reason you wanted it was to > > fix the type of a field in an mtio structure, and in that case the > > type would just need to be defined in mtio.h. > > I need it for LTP [1]. It's actually workaround for missing struct ustat [2]. > If it's really useless to have it in musl, I'll use in LTP __kernel_daddr_t from . > > [1] https://patchwork.ozlabs.org/patch/1102380/ > [2] https://github.com/linux-test-project/ltp/blob/master/include/lapi/ustat.h Per http://man7.org/linux/man-pages/man2/ustat.2.html: ustat() is deprecated and has been provided only for compatibility. All new programs should use statfs(2) instead. AFAIK we've never hit anything that needed/wanted ustat, and the interface has fundamental limitations that make it mostly (entirely?) non-useful. I'm not sure why LTP is testing it... Rich