diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-11-25 19:09:15 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-11-25 19:09:28 -0500 |
commit | 580f0a573f324bac4862ebd2030234b27e9a1d59 (patch) | |
tree | 81ad9b237b34d66d4462e25049b564fdb90195ec /sys-apps/memtest86+ | |
parent | app-emulation/open-vm-tools: add kernel config checks (diff) | |
download | gentoo-580f0a573f324bac4862ebd2030234b27e9a1d59.tar.gz gentoo-580f0a573f324bac4862ebd2030234b27e9a1d59.tar.bz2 gentoo-580f0a573f324bac4862ebd2030234b27e9a1d59.zip |
sys-apps/memtest86+: fix build w/out 32-bit glibc #592638
Diffstat (limited to 'sys-apps/memtest86+')
-rw-r--r-- | sys-apps/memtest86+/files/memtest86+-5.01-no-C-headers.patch | 47 | ||||
-rw-r--r-- | sys-apps/memtest86+/memtest86+-5.01-r2.ebuild | 1 |
2 files changed, 48 insertions, 0 deletions
diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-no-C-headers.patch b/sys-apps/memtest86+/files/memtest86+-5.01-no-C-headers.patch new file mode 100644 index 000000000000..bbb222849df1 --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-5.01-no-C-headers.patch @@ -0,0 +1,47 @@ +avoid using C library headers as it'd mean we'd need 32-bit glibc files available + +https://bugs.gentoo.org/592638 + +--- a/dmi.c ++++ b/dmi.c +@@ -10,7 +10,7 @@ + + + #include "test.h" +-#include <stdint.h> ++#include "stdint.h" + + + #define round_up(x,y) (((x) + (y) - 1) & ~((y)-1)) +--- a/test.c ++++ b/test.c +@@ -14,7 +14,28 @@ + #include "stdint.h" + #include "cpuid.h" + #include "smp.h" +-#include <sys/io.h> ++ ++static inline unsigned char ++inb_p (unsigned short int __port) ++{ ++ unsigned char _v; ++ ++ __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port)); ++ return _v; ++} ++ ++static inline void ++outb (unsigned char __value, unsigned short int __port) ++{ ++ __asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port)); ++} ++ ++static inline void ++outb_p (unsigned char __value, unsigned short int __port) ++{ ++ __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value), ++ "Nd" (__port)); ++} + + extern struct cpu_ident cpu_id; + extern volatile int mstr_cpu; diff --git a/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild b/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild index 7d3372c82c5b..831cf329d286 100644 --- a/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild +++ b/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild @@ -30,6 +30,7 @@ src_prepare() { epatch "${FILESDIR}"/${P}-io-extern-inline.patch #548312 epatch "${FILESDIR}"/${P}-reboot-def.patch #548312 epatch "${FILESDIR}"/${P}-no-clean.patch #557890 + epatch "${FILESDIR}"/${P}-no-C-headers.patch #592638 if use serial ; then sed -i \ |