include/env.h: Ensure ulong is defined
PATCH 1/1 include/env.h: Ensure ulong is defined
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.
--- include/env.h | 2 ++ 1 file changed, 2 insertions(+)
include/env.h +2 -0
@@ -13,6 +13,8 @@#include <stdbool.h> #include <linux/types.h> +typedef unsigned long ulong ; +struct environment_s ;/* Value for environment validity */
Signature · 1 line
2.23.0
PATCH 1/1 include/env.h: Ensure ulong is defined
Quoted 4 lines · Alistair Francis
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/
Quoted 26 lines
Signed-off-by Alistair Francis <[email protected]>--- include/env.h | 2 ++ 1 file changed, 2 insertions(+)include/env.h +2
-1@@ -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
PATCH 1/1 include/env.h: Ensure ulong is defined
Quoted 10 lines · David Abdurachmanov
Quoted 4 lines · Alistair Francis
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:
That didn't fix the problem for musl.
Alistair
Quoted 26 lines
Quoted 26 lines
Signed-off-by Alistair Francis <[email protected]>--- include/env.h | 2 ++ 1 file changed, 2 insertions(+)include/env.h +2
-1@@ -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
PATCH 1/1 include/env.h: Ensure ulong is defined
In reply to Alistair FrancisQuoted 14 lines · Alistair Francis
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 <[email protected]>--- include/env.h | 2 ++ 1 file changed, 2 insertions(+)include/env.h +0
-0
include/env.h line 20
Quoted 8 lines
include/env.h +2
-0@@ -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.
Signature · 8 lines
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>
PATCH 1/1 include/env.h: Ensure ulong is defined
Quoted 24 lines · Tom Rini
Quoted 22 lines · Alistair Francis
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 <[email protected]>--- include/env.h | 2 ++ 1 file changed, 2 insertions(+)include/env.h +2
-0@@ -13,6 +13,8 @@#include <stdbool.h> #include <linux/types.h> +typedef unsigned long ulong ; +struct environment_s ;
Quoted 5 lines
include/env.h line 20
Quoted 1 line
include/env.h +0
-0/* 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
Quoted 4 lines
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
Quoted 1 line
PATCH 1/1 include/env.h: Ensure ulong is defined
Quoted 31 lines · Alistair Francis
Quoted 24 lines · Tom Rini
Quoted 22 lines · Alistair Francis
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 <[email protected]>--- include/env.h | 2 ++ 1 file changed, 2 insertions(+)include/env.h +2
-0@@ -13,6 +13,8 @@#include <stdbool.h> #include <linux/types.h> +typedef unsigned long ulong ; +struct environment_s ;Quoted 5 lines
include/env.h line 20
Quoted 1 line
include/env.h +0
-0/* 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
Quoted 4 lines
That only applies if
__KERNEL_STRICT_NAMESisn'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.
Quoted 6 lines
Quoted 4 lines
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.
Signature · 8 lines
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>