diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2019-12-16 23:14:56 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2019-12-16 23:15:10 +0000 |
commit | 069a96a2ea5aaa7d4d27d2423f4a1845663272eb (patch) | |
tree | 2a555de8f0f0ac60968178fa0dc66bcd928a6515 /dev-embedded | |
parent | media-libs/grilo: Support totem-pl-parser-3.26.4 (diff) | |
download | gentoo-069a96a2ea5aaa7d4d27d2423f4a1845663272eb.tar.gz gentoo-069a96a2ea5aaa7d4d27d2423f4a1845663272eb.tar.bz2 gentoo-069a96a2ea5aaa7d4d27d2423f4a1845663272eb.zip |
dev-embedded/u-boot-tools: fix build on musl, bug #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).
Reported-by: eroen
Closes: https://bugs.gentoo.org/703132
Package-Manager: Portage-2.3.82, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-embedded')
-rw-r--r-- | dev-embedded/u-boot-tools/files/u-boot-tools-2019.10-musl-ulong.patch | 19 | ||||
-rw-r--r-- | dev-embedded/u-boot-tools/u-boot-tools-2019.10.ebuild | 2 |
2 files changed, 21 insertions, 0 deletions
diff --git a/dev-embedded/u-boot-tools/files/u-boot-tools-2019.10-musl-ulong.patch b/dev-embedded/u-boot-tools/files/u-boot-tools-2019.10-musl-ulong.patch new file mode 100644 index 000000000000..910e95a8cbf6 --- /dev/null +++ b/dev-embedded/u-boot-tools/files/u-boot-tools-2019.10-musl-ulong.patch @@ -0,0 +1,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; diff --git a/dev-embedded/u-boot-tools/u-boot-tools-2019.10.ebuild b/dev-embedded/u-boot-tools/u-boot-tools-2019.10.ebuild index bcda5a2499b5..5e06655915d3 100644 --- a/dev-embedded/u-boot-tools/u-boot-tools-2019.10.ebuild +++ b/dev-embedded/u-boot-tools/u-boot-tools-2019.10.ebuild @@ -22,6 +22,8 @@ DEPEND=" S=${WORKDIR}/${MY_P} +PATCHES=("${FILESDIR}"/${P}-musl-ulong.patch) + src_compile() { # Unset a few KBUILD variables. Bug #540476 unset KBUILD_OUTPUT KBUILD_SRC |