lcd4linux: fix compile (#1981)
[openwrt/svn-archive/archive.git] / utils / lcd4linux / patches / 120-remove_parport_outb.patch
1 Index: lcd4linux-0.10.0+cvs20051015.orig/drv_generic_parport.c
2 ===================================================================
3 --- lcd4linux-0.10.0+cvs20051015.orig.orig/drv_generic_parport.c 2007-07-07 14:02:55.000000000 +0200
4 +++ lcd4linux-0.10.0+cvs20051015.orig/drv_generic_parport.c 2007-07-07 14:02:57.000000000 +0200
5 @@ -117,16 +117,6 @@
6 #include <sys/stat.h>
7 #include <sys/ioctl.h>
8
9 -#ifdef HAVE_SYS_IO_H
10 -#include <sys/io.h>
11 -#define WITH_OUTB
12 -#else
13 -#ifdef HAVE_ASM_IO_H
14 -#include <asm/io.h>
15 -#define WITH_OUTB
16 -#endif
17 -#endif
18 -
19 #if defined (HAVE_LINUX_PARPORT_H) && defined (HAVE_LINUX_PPDEV_H)
20 #define WITH_PPDEV
21 #include <linux/parport.h>
22 @@ -143,6 +133,11 @@
23 #define PARPORT_STATUS_BUSY 0x80
24 #endif
25
26 +#ifndef WITH_OUTB
27 +#define inb(foo) 0
28 +#define outb(foo,bar) 0
29 +#endif
30 +
31 #if !defined(WITH_OUTB) && !defined(WITH_PPDEV)
32 #error neither outb() nor ppdev() possible
33 #error cannot compile parallel port driver