summaryrefslogtreecommitdiff
path: root/dev-embedded/u-boot-tools/files/u-boot-tools-2019.10-musl-ulong.patch
blob: 910e95a8cbf6a60e6e1c7c346cfc0dee210d0ea1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
https://bugs.gentoo.org/703132

include/compiler.h implies to define 'ulong' type.
glibc and musl define it on different conditions.
As a result tools fail to build on musl as:
    include/env.h:159:1: error: unknown type name 'ulong'; did you mean 'long'?

We fix it by defining 'ulong' unconditionally (as on BSD).

--- a/include/compiler.h
+++ b/include/compiler.h
@@ -44,6 +44,7 @@
 #ifdef __linux__
 # include <endian.h>
 # include <byteswap.h>
+typedef unsigned long ulong;
 #elif defined(__MACH__) || defined(__FreeBSD__)
 # include <machine/endian.h>
 typedef unsigned long ulong;