mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-24 08:16:10 +00:00
intel_reg: support platforms without sys/io.h
Based on an idea from Jani Nikula. Cc: Jani Nikula <jani.nikula@intel.com> Cc: Derek Morton <derek.j.morton@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
parent
0705ce6d15
commit
80f1553780
@ -56,7 +56,7 @@ AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = xyes])
|
|||||||
|
|
||||||
# Checks for functions, headers, structures, etc.
|
# Checks for functions, headers, structures, etc.
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
AC_CHECK_HEADERS([termios.h linux/kd.h sys/kd.h libgen.h])
|
AC_CHECK_HEADERS([termios.h linux/kd.h sys/kd.h libgen.h sys/io.h])
|
||||||
AC_CHECK_MEMBERS([struct sysinfo.totalram],[],[],[AC_INCLUDES_DEFAULT
|
AC_CHECK_MEMBERS([struct sysinfo.totalram],[],[],[AC_INCLUDES_DEFAULT
|
||||||
#include <sys/sysinfo.h>
|
#include <sys/sysinfo.h>
|
||||||
])
|
])
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/io.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -38,6 +37,22 @@
|
|||||||
|
|
||||||
#include "intel_reg_spec.h"
|
#include "intel_reg_spec.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_IO_H
|
||||||
|
#include <sys/io.h>
|
||||||
|
#else
|
||||||
|
|
||||||
|
static inline int _not_supported(void)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "portio-vga not supported\n");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
#define inb(port) _not_supported()
|
||||||
|
#define outb(value, port) _not_supported()
|
||||||
|
#define iopl(level)
|
||||||
|
|
||||||
|
#endif /* HAVE_SYS_IO_H */
|
||||||
|
|
||||||
struct config {
|
struct config {
|
||||||
struct pci_device *pci_dev;
|
struct pci_device *pci_dev;
|
||||||
char *mmiofile;
|
char *mmiofile;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user