Browse Source

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>
scm-imx_v2016.03_4.1.15_2.0.0_ga
Stephen Warren 5 years ago
committed by Tom Rini
parent
commit
60f989a939
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      lib/lz4_wrapper.c

+ 3
- 1
lib/lz4_wrapper.c View File

@ -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) {


Loading…
Cancel
Save