[U-Boot] [PATCH] include/env.h: Ensure ulong is defined

Tom Rini trini at konsulko.com
Thu Nov 7 22:49:16 UTC 2019


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 <alistair.francis at wdc.com>
> ---
>  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 <stdbool.h>
>  #include <linux/types.h>
>  
> +typedef unsigned long           ulong;
> +
>  struct environment_s;
>  
>  /* Value for environment validity */

What exactly is the case you're hitting this under?  <linux/types.h> is
where we have that typedef.  I'd almost rather spell out unsigned 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.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191107/392c47e8/attachment.sig>


More information about the U-Boot mailing list