aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/hwaccess_x86_io_unittest.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/hwaccess_x86_io_unittest.h b/tests/hwaccess_x86_io_unittest.h
index 7bffc963..2a4cd5f3 100644
--- a/tests/hwaccess_x86_io_unittest.h
+++ b/tests/hwaccess_x86_io_unittest.h
@@ -38,7 +38,17 @@
#define INL(p) test_inl(p)
#include <stdint.h>
-#include <sys/io.h>
+
+/*
+ * Dummy implementation of iopl from sys/io.h.
+ * sys/io.h by itself is platform-specific, so instead of including
+ * the header we just have this dummy function, which is sufficient
+ * for test purposes.
+ */
+static inline int iopl(int level)
+{
+ return 0;
+}
/* All functions below are mocked in unit tests. */