From 8cd0c73fb54658e9176c4b78a57bc9e99eab4faf Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Sat, 14 Nov 2015 02:55:12 +0000 Subject: Add (implicit) support for musl libc This is mostly achieved by fixing or refining the inclusion of header files and replacing glibc-specific ifdefs with more generic ones. - : Contains iopl(2) and x86 I/O port access functions (inb, outb etc). Generally Linux-specific but also availble on debian/kFreeBSD. Provided by glibc as well as musl and uclibc. Include it if we are running Linux or if glibc is detected. - : should be (and is) replaced by (without the "sys" prefix). - : Does not include all necessary headers, namely _IOC_SIZEBITS that is used in the definition of SPI_MSGSIZE is not brought in via but instead we relied so far on glibc's including it via . Change that to explicitly including . - : Would also be available in musl but there is no easy way to detect it so we do not try yet. Corresponding to flashrom svn r1898. The bug report and initial patches were Signed-off-by: Gwenhael Goavec-Merou Signed-off-by: Stefan Tauner Acked-by: Stefan Tauner --- linux_spi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'linux_spi.c') diff --git a/linux_spi.c b/linux_spi.c index 26725e1d6..19b4965d4 100644 --- a/linux_spi.c +++ b/linux_spi.c @@ -22,13 +22,14 @@ #include #include #include -#include +#include #include #include #include +#include #include #include -#include +#include #include "flash.h" #include "chipdrivers.h" #include "programmer.h" -- cgit v1.2.3