From: Tom Rini Date: Fri, 8 Nov 2019 19:05:01 -0500 Subject: [U-Boot] [PATCH] include/env.h: Ensure ulong is defined In-Reply-To: <7508130d24f67c1046d6f5fe2509a03fde129772.camel@wdc.com> References: <20191105193045.24981-1-alistair.francis@wdc.com> <20191107224916.GS19317@bill-the-cat> <7508130d24f67c1046d6f5fe2509a03fde129772.camel@wdc.com> Message-ID: <20191109000501.GT19317@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Nov 08, 2019 at 10:24:52PM +0000, Alistair Francis wrote: > On Thu, 2019-11-07 at 17:49 -0500, Tom Rini wrote: > > On Tue, Nov 05, 2019 at 11:30:45AM -0800, Alistair Francis wrote: > > > > > To fix these failures when building with musl: > > > include/env.h:166:1: error: unknown type name 'ulong'; did you > > > mean 'long'? > > > ensure that ulong is defined. > > > > > > Signed-off-by: Alistair Francis > > > --- > > > include/env.h | 2 ++ > > > 1 file changed, 2 insertions(+) > > > > > > diff --git a/include/env.h b/include/env.h > > > index b72239f6a5..5ca49a3456 100644 > > > --- a/include/env.h > > > +++ b/include/env.h > > > @@ -13,6 +13,8 @@ > > > #include > > > #include > > > > > > +typedef unsigned long ulong; > > > + > > > struct environment_s; > > > > > > /* Value for environment validity */ > > > > What exactly is the case you're hitting this under? > > is > > where we have that typedef. I'd almost rather spell out unsigned > > That only applies if __KERNEL_STRICT_NAMES isn't defined (I'm guessing > it somehow is for musl). > > https://github.com/u-boot/u-boot/blob/master/include/linux/types.h#L8 OK, so lets first understand for sure how we're getting in to this position. > > long > > in a few more places than add a typedef here, if we can't solve this > > via > > correcting some include order or some other underlying problem. > > Is there somehwere else you would prefer it? If, once we know why the existing typedef's are used, and it's a feature not a bug then we should probably clean function prototypes to be more portably correct rather than adding a typedef for this case. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: