diff options
author | Stephen Warren <swarren@wwwdotorg.org> | 2015-11-14 23:53:49 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-11-18 15:28:59 -0500 |
commit | 60f989a939643a3fdf9553613f1b916a45a9c6ed (patch) | |
tree | 7636f83670e995208076b2b5f15c0687ae5a3d6e /lib | |
parent | 89127c5346789b7d6bdbf411b4b5017521336b2b (diff) |
Fix sandbox build on Ubuntu 10.04
gcc 4.4.3 (which is the default native compiler on x86-64 Ubuntu 10.04)
doesn't seem to like initializers for sub-fields of anonymous unions.
Solve this by replacing the initialization with an assignment. This
fixes:
lib/lz4_wrapper.c: In function ‘ulz4fn’:
lib/lz4_wrapper.c:97: error: unknown field ‘raw’ specified in initializer
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lz4_wrapper.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/lz4_wrapper.c b/lib/lz4_wrapper.c index 0739663fca..6dc8b764b3 100644 --- a/lib/lz4_wrapper.c +++ b/lib/lz4_wrapper.c @@ -94,7 +94,9 @@ int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn) } while (1) { - struct lz4_block_header b = { .raw = le32_to_cpu(*(u32 *)in) }; + struct lz4_block_header b; + + b.raw = le32_to_cpu(*(u32 *)in); in += sizeof(struct lz4_block_header); if (in - src + b.size > srcn) { |