When cross compiling inteltool with musl-libc the <sys/io.h> header is not included due to this test in inteltool.h:
#if defined(__GLIBC__) #include <sys/io.h> #endif
Unfortunately I'm not sure what the right test is here, since the musl libc team is opposed to having a __MUSL__ define:
http://openwall.com/lists/musl/2013/03/29/13
why on earth is that test there? what does glibc have to do with whether you have sys/io.h?
I suggest removing the guard.
On Wed, Feb 14, 2018 at 10:12 AM Trammell Hudson hudson@trmm.net wrote:
When cross compiling inteltool with musl-libc the <sys/io.h> header is not included due to this test in inteltool.h:
#if defined(__GLIBC__) #include <sys/io.h> #endif
Unfortunately I'm not sure what the right test is here, since the musl libc team is opposed to having a __MUSL__ define:
http://openwall.com/lists/musl/2013/03/29/13
-- Trammell
-- coreboot mailing list: coreboot@coreboot.org https://mail.coreboot.org/mailman/listinfo/coreboot
On Wed, Feb 14, 2018 at 11:11:46AM -0700, Trammell Hudson wrote:
When cross compiling inteltool with musl-libc the <sys/io.h> header is not included due to this test in inteltool.h:
#if defined(__GLIBC__) #include <sys/io.h> #endif
We should provide our own I/O space inlines. ISTR we do for nvramtool, superiotool, and flashrom.
For instance, NetBSD libc will not expose these inlines to userland.
This is to say nothing of the NetBSD x86 I/O space write inlines having reversed argument order compared to their glibc counterparts.
Jonathan Kollasch
On Wed, Feb 14, 2018 at 11:11:46AM -0700, Trammell Hudson wrote:
When cross compiling inteltool with musl-libc the <sys/io.h> header is not included due to this test in inteltool.h:
#if defined(__GLIBC__) #include <sys/io.h> #endif
Same story on other platforms: sys/io.h[1] is implemented through i386_iopl(2)[2]/amd64_iopl(2)[3] and sysarch(2)[4] on OpenBSD.
Many tools under util/ are developed with Linux/glibc in mind (only).
Unfortunately I'm not sure what the right test is here, since the musl libc team is opposed to having a __MUSL__ define:
1: http://man7.org/linux/man-pages/man2/iopl.2.html 2: http://man.openbsd.org/OpenBSD-6.0/./man2/sysarch.2 3: http://man.openbsd.org/OpenBSD-6.0/./man2/i386/i386_iopl.2 4: http://man.openbsd.org/OpenBSD-6.0/./man2/amd64/amd64_iopl.2