* [U-Boot] [PATCH] include/env.h: Ensure ulong is defined
@ 2019-11-05 19:30 Alistair Francis
2019-11-06 15:59 ` David Abdurachmanov
2019-11-07 22:49 ` Tom Rini
0 siblings, 2 replies; 6+ messages in thread
From: Alistair Francis @ 2019-11-05 19:30 UTC (permalink / raw)
To: u-boot
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@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 */
--
2.23.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] include/env.h: Ensure ulong is defined
2019-11-05 19:30 [U-Boot] [PATCH] include/env.h: Ensure ulong is defined Alistair Francis
@ 2019-11-06 15:59 ` David Abdurachmanov
2019-11-06 17:46 ` Alistair Francis
2019-11-07 22:49 ` Tom Rini
1 sibling, 1 reply; 6+ messages in thread
From: David Abdurachmanov @ 2019-11-06 15:59 UTC (permalink / raw)
To: u-boot
On Wed, Nov 6, 2019 at 4:30 PM Alistair Francis
<alistair.francis@wdc.com> 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.
I think, this was fixed before 2019.10 release by this patchset:
https://patchwork.ozlabs.org/cover/1152432/
>
> Signed-off-by: Alistair Francis <alistair.francis@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 */
> --
> 2.23.0
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] include/env.h: Ensure ulong is defined
2019-11-06 15:59 ` David Abdurachmanov
@ 2019-11-06 17:46 ` Alistair Francis
0 siblings, 0 replies; 6+ messages in thread
From: Alistair Francis @ 2019-11-06 17:46 UTC (permalink / raw)
To: u-boot
On Wed, 2019-11-06 at 17:59 +0200, David Abdurachmanov wrote:
> On Wed, Nov 6, 2019 at 4:30 PM Alistair Francis
> <alistair.francis@wdc.com> 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.
>
> I think, this was fixed before 2019.10 release by this patchset:
>
> https://patchwork.ozlabs.org/cover/1152432/
That didn't fix the problem for musl.
Alistair
>
> > Signed-off-by: Alistair Francis <alistair.francis@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 */
> > --
> > 2.23.0
> >
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot at lists.denx.de
> > https://lists.denx.de/listinfo/u-boot
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] include/env.h: Ensure ulong is defined
2019-11-05 19:30 [U-Boot] [PATCH] include/env.h: Ensure ulong is defined Alistair Francis
2019-11-06 15:59 ` David Abdurachmanov
@ 2019-11-07 22:49 ` Tom Rini
2019-11-08 22:24 ` Alistair Francis
1 sibling, 1 reply; 6+ messages in thread
From: Tom Rini @ 2019-11-07 22:49 UTC (permalink / raw)
To: u-boot
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@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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] include/env.h: Ensure ulong is defined
2019-11-07 22:49 ` Tom Rini
@ 2019-11-08 22:24 ` Alistair Francis
2019-11-09 0:05 ` Tom Rini
0 siblings, 1 reply; 6+ messages in thread
From: Alistair Francis @ 2019-11-08 22:24 UTC (permalink / raw)
To: u-boot
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 <alistair.francis@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
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
> 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?
Alistair
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] include/env.h: Ensure ulong is defined
2019-11-08 22:24 ` Alistair Francis
@ 2019-11-09 0:05 ` Tom Rini
0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2019-11-09 0:05 UTC (permalink / raw)
To: u-boot
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 <alistair.francis@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
>
> 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: <http://lists.denx.de/pipermail/u-boot/attachments/20191108/92099dcf/attachment.sig>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-11-09 0:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05 19:30 [U-Boot] [PATCH] include/env.h: Ensure ulong is defined Alistair Francis
2019-11-06 15:59 ` David Abdurachmanov
2019-11-06 17:46 ` Alistair Francis
2019-11-07 22:49 ` Tom Rini
2019-11-08 22:24 ` Alistair Francis
2019-11-09 0:05 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.