[PATCH v2 2/2] include/u-boot/crc.h: pull 'uint' definition on musl targets

Sergei Trofimovich
2019-12-30T15:53:42Z

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 | 2 ++
1 file changed, 2 insertions(+)

diff --git a/include/u-boot/crc.h b/include/u-boot/crc.h
index 1086d2168c..bfd477f31d 100644
--- a/include/u-boot/crc.h
+++ b/include/u-boot/crc.h
@@ -8,6 +8,8 @@
#ifndef _UBOOT_CRC_H
#define _UBOOT_CRC_H

+#include <compiler.h> /* 'uint*' definitions */
+
/**
* crc8() - Calculate and return CRC-8 of the data
*
--
2.24.1