diff options
author | Yann E. MORIN <yann.morin.1998@free.fr> | 2015-10-28 22:55:49 +0100 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2015-10-28 23:37:04 +0100 |
commit | fc2c039c90336160bb58ddd2011ef89c4deb1121 (patch) | |
tree | fe5a33fb04aade3d2dd9430afcd05ac5af057589 /package/flashrom/0002-sys-io.h.patch | |
parent | 78521ca8bd2f8b7722521e2e9055dd59b8d9fc54 (diff) | |
download | buildroot-fc2c039c90336160bb58ddd2011ef89c4deb1121.tar.gz buildroot-fc2c039c90336160bb58ddd2011ef89c4deb1121.zip |
package/flashrom: fix build failures with musl
flashroms makes a few assumptions on the headers to be included.
It forgets that not everything is using glibc, so it is missing
crucial includes.
Fixes:
http://autobuild.buildroot.org/results/2a3/2a3744007c630c267575a638ebcd83a4b97644f5/
http://autobuild.buildroot.org/results/3de/3de936d9be79e151e66af15193084d82a0f2c04a/
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/flashrom/0002-sys-io.h.patch')
-rw-r--r-- | package/flashrom/0002-sys-io.h.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/package/flashrom/0002-sys-io.h.patch b/package/flashrom/0002-sys-io.h.patch new file mode 100644 index 0000000000..ddb2b4c5f8 --- /dev/null +++ b/package/flashrom/0002-sys-io.h.patch @@ -0,0 +1,27 @@ +hwaccess: sys/io.h is not specific to glibc + +Under Linux, sys/io.h provides inb and outb, so we really need it. +However, its inclusion is conditional to the _GLIBC_ define. This is +usually OK under Linux, since both glibc and uClibc define it (uclibc +fakes being glibc). + +But the mus lC library does not impersonate glibc, so we're missing +including sys/io.h in this case. + +Change the include from checking _GLIBC_ to checking whether this is +Linux, looking for the __linux__ define. + +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> + +diff -durN flashrom-0.9.8.orig/hwaccess.h flashrom-0.9.8/hwaccess.h +--- flashrom-0.9.8.orig/hwaccess.h 2015-02-10 09:03:10.000000000 +0100 ++++ flashrom-0.9.8/hwaccess.h 2015-10-28 20:01:54.259202484 +0100 +@@ -27,7 +27,7 @@ + #include "platform.h" + + #if IS_X86 +-#if defined(__GLIBC__) ++#if defined(__linux__) + #include <sys/io.h> + #endif + #endif |