0002-sys-io.h.patch 888 B

123456789101112131415161718192021222324252627
  1. hwaccess: sys/io.h is not specific to glibc
  2. Under Linux, sys/io.h provides inb and outb, so we really need it.
  3. However, its inclusion is conditional to the _GLIBC_ define. This is
  4. usually OK under Linux, since both glibc and uClibc define it (uclibc
  5. fakes being glibc).
  6. But the musl C library does not impersonate glibc, so we're missing
  7. including sys/io.h in this case.
  8. Change the include from checking _GLIBC_ to checking whether this is
  9. Linux, looking for the __linux__ define.
  10. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
  11. diff -durN flashrom-0.9.8.orig/hwaccess.h flashrom-0.9.8/hwaccess.h
  12. --- flashrom-0.9.8.orig/hwaccess.h 2015-02-10 09:03:10.000000000 +0100
  13. +++ flashrom-0.9.8/hwaccess.h 2015-10-28 20:01:54.259202484 +0100
  14. @@ -27,7 +27,7 @@
  15. #include "platform.h"
  16. #if IS_X86
  17. -#if defined(__GLIBC__)
  18. +#if defined(__linux__)
  19. #include <sys/io.h>
  20. #endif
  21. #endif