From b63b067ae22803689592db482611093b33a29eef Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Fri, 2 Jul 2010 17:12:50 +0000 Subject: Add OpenBSD support Add a requirements section to the man page which lists the needed access permissions for each programmer. This feature needs my pciutils/libpci 8/16-bit write emulation patch at http://marc.info/?l=openbsd-ports&m=127780030728045 titled [PATCH] Fix pciutils non-32bit PCI write on OpenBSD Corresponding to flashrom svn r1067. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Stuart Henderson --- hwaccess.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'hwaccess.h') diff --git a/hwaccess.h b/hwaccess.h index 53e908a..c38ee6f 100644 --- a/hwaccess.h +++ b/hwaccess.h @@ -228,17 +228,25 @@ cpu_to_be(64) #endif #endif -#if defined(__NetBSD__) +#if defined(__NetBSD__) || defined (__OpenBSD__) #define off64_t off_t #define lseek64 lseek #if defined(__i386__) || defined(__x86_64__) #include #include +#if defined(__NetBSD__) #if defined(__i386__) #define iopl i386_iopl #elif defined(__x86_64__) #define iopl x86_64_iopl #endif +#elif defined (__OpenBSD__) + #if defined(__i386__) + #define iopl i386_iopl + #elif defined(__amd64__) + #define iopl amd64_iopl + #endif +#endif #include static inline void outb(uint8_t value, uint16_t port) -- cgit v1.1