openbsd-ports/sysutils/freeipmi/patches/patch-libfreeipmi_src_ipmi-smic-api_c
wilfried fa7d0f0b1e import of freeipmi-0.4.6
FreeIPMI is a collection of Intelligent Platform Management IPMI
system software. It provides in-band and out-of-band software and
a development library conforming to the Intelligent Platform
Management Interface (IPMI v1.5 and v2.0) standards.
2007-10-25 18:17:02 +00:00

21 lines
677 B
Plaintext

$OpenBSD: patch-libfreeipmi_src_ipmi-smic-api_c,v 1.1.1.1 2007/10/25 18:17:02 wilfried Exp $
--- libfreeipmi/src/ipmi-smic-api.c.orig Sat Jun 2 20:18:29 2007
+++ libfreeipmi/src/ipmi-smic-api.c Tue Oct 23 17:56:48 2007
@@ -135,7 +135,15 @@ ipmi_smic_io_init (uint8_t sms_io_base, unsigned long
{
smic_sleep_usecs = sleep_usecs;
-#ifdef __FreeBSD__
+#ifdef __OpenBSD__
+# if defined(__amd64__)
+ return (amd64_iopl (3));
+# elif defined(__i386__)
+ return (i386_iopl (3));
+# else
+ return (-1);
+# endif
+#elif __FreeBSD__
#ifdef USE_IOPERM
/* i386_set_ioperm has known problems on FBSD 5.x (bus errors). */
return (i386_set_ioperm(sms_io_base, 0x02, 0x01));