diff options
author | Simon Glass <sjg@chromium.org> | 2021-09-25 07:03:13 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-10-08 15:53:26 -0400 |
commit | 5a4f10d71bfe2b7a5646cf1f96b298805b36df7a (patch) | |
tree | 69d26ef5c2dd88d04f7700e2c0542fedc12cf01a /include/compiler.h | |
parent | 02ace2cd4942da507414b23645cd7bec99f23174 (diff) | |
download | u-boot-5a4f10d71bfe2b7a5646cf1f96b298805b36df7a.zip u-boot-5a4f10d71bfe2b7a5646cf1f96b298805b36df7a.tar.gz u-boot-5a4f10d71bfe2b7a5646cf1f96b298805b36df7a.tar.bz2 |
gzip: Avoid use of u64
The gzip API uses the u64 type in it, which is not available in the host
build. This makes it impossible to include the header file.
We could make this type available, but it seems unnecessary. Limiting the
compression size to that of the 'unsigned long' type seems good enough. On
32-bit machines the limit then becomes 4GB, which likely exceeds available
RAM anyway, therefore it should be sufficient. On 64-bit machines this is
effectively u64 anyway.
Update the header file and implementation to use 'ulong' instead of 'u64'.
Add a definition of u32 for the cases that seem to need exactly that
length. This should be safe enough.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/compiler.h')
-rw-r--r-- | include/compiler.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/compiler.h b/include/compiler.h index 67e5205..6b0d3bf 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -68,6 +68,9 @@ typedef uint32_t __u32; typedef unsigned int uint; typedef unsigned long ulong; +/* Define these on the host so we can build some target code */ +typedef __u32 u32; + #define uswap_16(x) \ ((((x) & 0xff00) >> 8) | \ (((x) & 0x00ff) << 8)) |