]> git.dujemihanovic.xyz Git - u-boot.git/commit
include/u-boot/crc.h: pull 'uint' definition on musl targets
authorSergei Trofimovich <slyfox@gentoo.org>
Mon, 30 Dec 2019 15:53:42 +0000 (15:53 +0000)
committerTom Rini <trini@konsulko.com>
Fri, 3 Jan 2020 14:47:10 +0000 (09:47 -0500)
commitc6ad93612ac90e99ae19103146d1128fef4030ea
treef2d4069e67993d95c4e8b6b4f3ee32409c54d8bd
parentd11fa9c16b8f50788c07e22bd742177d14e435b2
include/u-boot/crc.h: pull 'uint' definition on musl targets

The build failure was originally reported on arm64-musl
target at https://bugs.gentoo.org/703132. Here is the amd64-musl
variant:

```
$ LANG=C make CROSS_COMPILE=x86_64-gentoo-linux-musl- tools-only_defconfig -j$(nproc)
$ LANG=C make CROSS_COMPILE=x86_64-gentoo-linux-musl- tools-all            -j$(nproc)
...
include/u-boot/crc.h:37:44: error: unknown type name 'uint'; did you mean 'int'?
   37 | void crc16_ccitt_wd_buf(const uint8_t *in, uint len,
      |                                            ^~~~
      |                                            int
```

Note: 'uint' is not defined there.

On glibc 'uint' comes from <sys/types.h> and happens to work on most .c files.

The change imports 'uint' declaration from '<compiler.h>'.

Bug: https://bugs.gentoo.org/703132
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
include/u-boot/crc.h