diff --git a/tests/hwaccess_x86_io_unittest.h b/tests/hwaccess_x86_io_unittest.h index 7bffc963a..2a4cd5f3c 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 -#include + +/* + * 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. */