From 27529bc77f0efa0bdc7a75e42778ed73eb4f8f42 Mon Sep 17 00:00:00 2001 From: gfk Date: Mon, 23 Dec 2002 19:35:43 +0000 Subject: [PATCH] Old linuxes support (glibc1 and libc5). --- server/drivers/port.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/server/drivers/port.h b/server/drivers/port.h index 7b52425..fd9a179 100644 --- a/server/drivers/port.h +++ b/server/drivers/port.h @@ -10,6 +10,8 @@ * NetBSD & OpenBSD port by Guillaume Filion, copyright 12/2001 and 02/2002 * * (Better) FreeBSD port by Guillaume Filion, copyright 05/2002 + * + * Improved support for old Linux (glibc1 and libc5) by Guillaume Filion, 12/2002 */ /* @@ -51,8 +53,17 @@ Returns 0 if successful, -1 if failed /* ------------------------------------------------------------- */ /* Use ioperm, inb and outb in (Linux) */ -#if defined HAVE_IOPERM && HAVE_SYS_IO_H -#include +#if defined HAVE_IOPERM + +/* Glibc2 and Glibc1 */ +# ifdef HAVE_SYS_IO_H +# include +# endif + +/* Libc5 */ +# ifdef HAVE_UNISTD_H +# include +# endif /* Read a byte from port */ static inline int port_in (unsigned short int port) {